VMware Cloud Community
sexyboy32
Contributor
Contributor

FIlter all VM with disk in Thick

Hi all
I am looking for a command that allows you to display all vms with u or several disks in "thick provisioning"

1 / I think you should display everything = getvm

2/ make a condition = eq or ne

exemple : GetVm | Where-Object {$_.disk -ne thin} but it is noot working

Could you please correct me,

Thank you for helping me
Zohan

0 Kudos
2 Replies
LucD
Leadership
Leadership

Did you try with

Get-VM |
Where-Object{(Get-HardDisk -VM $_).StorageFormat -contains 'Thick'} |
Select-Object -Property Name


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

0 Kudos
sexyboy32
Contributor
Contributor

Thanks u,

It is working well

0 Kudos