VI-Toolkit: Calculate .vmdk size for Linux Guests

2008 August 18
by vandyblog

Not really a one-liner when you try to make it readable…

With help from halr9000

Calculate disk usage of all Linux Guest Virtual Machines:

get-vm
| where {  $_.Guest.OSFullName -match "Linux" -band $_.Guest.state -eq "Running" }
 | Get-HardDisk
| measure-object -sum CapacityKB