I am new to PowerCLI but not to scripting and these concepts. So my main problem is with syntax more than anything. I am trying to "clean up" some security hardening settings and can find plenty examples on how to do it.
foreach($vmguest in Get-VM){$vm.ReconfigVM($vmConfigSpec)}
My question is how do I check these parameters before and after they are set? Is there a "$vm.ListconfigVM" action? I would like to know what "isolation.tools.diskWiper.disable" is set to before I update it. Thanks.
You can modify LucD's script here: http://communities.vmware.com/message/1653036#1653036
Get-VM | Select Name, @{N="Diskwiper.Disable";E={ ($_.ExtensionData.Config.ExtraConfig | `
where {$_.Key -eq "isolation.tools.diskWiper.disable"}).Value}}
You can modify LucD's script here: http://communities.vmware.com/message/1653036#1653036
Get-VM | Select Name, @{N="Diskwiper.Disable";E={ ($_.ExtensionData.Config.ExtraConfig | `
where {$_.Key -eq "isolation.tools.diskWiper.disable"}).Value}}
Chris, thanks for pointing me to the right answer. Half the battle is knowing what to look for!
If you are using PowrGUI, on the right pane, you can drill down all the values that you get from "GET" command. It was really helpful to me when I first started writing scripts and hunting down values hidden deep inside. I also like to use Get-XXX $value | get-more command to explore extensions is command line.
David