VMware Cloud Community
dla123
Contributor
Contributor
Jump to solution

List VM Advanced Settings

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.

0 Kudos
1 Solution

Accepted Solutions
chriswahl
Virtuoso
Virtuoso
Jump to solution

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}}
VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators

View solution in original post

0 Kudos
3 Replies
chriswahl
Virtuoso
Virtuoso
Jump to solution

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}}
VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
0 Kudos
dla123
Contributor
Contributor
Jump to solution

Chris, thanks for pointing me to the right answer.  Half the battle is knowing what to look for!

0 Kudos
david615
Enthusiast
Enthusiast
Jump to solution

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

http://powerclinic.blogspot.com/
0 Kudos