LucD,
So I would like to change it up a bit and catch the info so I can report it in a report like this:
The problem is I don’t know what extensions would be for the items for the disk.. cause these don’t appear to work ☹
$Report = @()
Get-Cluster MYCLUSTER |get-vm MYVM | % {
$vm = Get-View $_.ID
$ReportRow = "" | Select-Object VMName,DiskCapacity,DiskFreespace
$ReportRow.VMName = $vm.Name
$ReportRow.DiskCapacity = $vm.extensiondata.guest.disk.capacity
$ReportRow.DiskFreespace = $vm.extensiondata.guest.disk.freespace
I need to do it this was cause this is the only way I know how to do it to make the report like this:
I want to really have diskUSED field but I don’t know how to do that except on how you showed me, but I don’t know how to convert it to how I need it.
Any help would be greatly appreciated!!!
MYVM DISK USAGE
VMName
DiskCapacity
DiskFreespace
myvm