More as a note to myself than anyone else, here’s a quick and dirty way to list all the VMs in a cluster with the number of snapshots, the used space, and the provisioned space. Yes you could get this information from the GUI but I like PowerShell and am trying to spend more time with PowerCLI.
1 |
Get-VM -Location (Get-Cluster -Name "My Cluster") | ft Name,PowerState,@{Name="Snapshots";Expression={(get-snapshot $_.Name | Measure-Object).Count}},@{Name="Used Space (GB)"; Expression={$_.UsedSpaceGB};FormatString="F0"},@{Name="Provisioned Space (GB)"; Expression={$_.ProvisionedSpaceGB}; FormatString="F0"},DatastoreIdList -AutoSize |