Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

The disktype can be deduced from the DiskType property

Get-VM | Get-HardDisk | select @{N="VM";E={$_.Parent.Name}},Name,DiskType

To test if the VMDK has a snapshot can be done by checking through a RegEx expression on the VMDK filename

Get-VM | Get-HardDisk | select @{N="VM";E={$_.Parent.Name}},Name,Filename,
 
@{N="Snapshotted";E={$_.Filename -match '-\d{6}.vmdk'}}

I included the Filename so you can see what is tested against.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos