There is a nice one-liner to get the VM disk details o my blog here:
http://www.virtu-al.net/2009/03/25/vi-toolkit-one-liner-vm-guest-disk-sizes/
The script is:
ForEach ($VM in (Get-VM |Get-View)){($VM.Guest.Disk |Select @{N=“Name“;E={$VM.Name}},DiskPath, @{N=“Capacity(MB)“;E={[math]::Round($_.Capacity/ 1MB)}}, @{N=“Free Space(MB)“;E={[math]::Round($_.FreeSpace / 1MB)}}, @{N=“Free Space %“;E={[math]::Round(((100 * ($_.FreeSpace))/ ($_.Capacity)),0)}}) | Format-Table}
If you found this information useful, please consider awarding points for Correct or Helpful.
Alan Renouf
There is a nice one-liner to get the VM disk details o my blog here:
http://www.virtu-al.net/2009/03/25/vi-toolkit-one-liner-vm-guest-disk-sizes/
The script is:
ForEach ($VM in (Get-VM |Get-View)){($VM.Guest.Disk |Select @{N=“Name“;E={$VM.Name}},DiskPath, @{N=“Capacity(MB)“;E={[math]::Round($_.Capacity/ 1MB)}}, @{N=“Free Space(MB)“;E={[math]::Round($_.FreeSpace / 1MB)}}, @{N=“Free Space %“;E={[math]::Round(((100 * ($_.FreeSpace))/ ($_.Capacity)),0)}}) | Format-Table}
If you found this information useful, please consider awarding points for Correct or Helpful.
Alan Renouf
Had issues with the PS script, but the one liner worked great! Thanks guys.