Wanted to get the space used by all VMs across a bunch of our newer hosts –
1 |
Get-VMHost host1,host2,host3 | Get-VM | ft Name,@{Name="Size (GB)"; Expression={$_.ProvisionedSpaceGb}; FormatString="N2"} -AutoSize |
There’s probably a way to show the total too but I used a separate pipeline for that –
1 |
Get-VMHost host1,host2,host3 | Get-VM | Measure-Object -Sum ProvisionedSpaceGb |