Can i get help please, I need to get all a list of all thin provisioned disks which are over 500gb only. The report needs to show the VM name, vmdk file, and size of the virtual disk. I have tried using powershell commands but cannot get the list.
Can anyone advise
Thanks
Try like this
Get-VM | Get-HardDisk |
where{$_.StorageFormat -eq 'Thin' -and $_.CapacityGB -gt 500} |
Select @{N='VM';E={$_.Parent}},Name,Filename,CapacityGB
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
this is what I've used in the past :-
get-cluster acluster | Get-VM | Get-HardDisk | ? {$_.capacityGB -gt '499'} | ? {$_.storageformat -like "thin"} | select parent,capacityGB,storageformat,filename | ft -AutoSize
either way chose 499GB, if the drive is 500GB it will get over looked
Not sure what you mean by "it will get overlooked".
Care to explain ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I also tried it, somehow its not displaying in powercli console even after using ft -AutoSize. You can export it to csv and then you can use Filter in excel. I tested it for -gt '10' GB
Get-Cluster XYZ | Get-VM | Get-HardDisk | where{$_.StorageFormat -eq 'Thin' -and $_.CapacityGB -gt '10'} | Export-Csv -Path C:\xxx\Data.csv