How To get the CPU, Memory and HDD Size from Power Off VMs ?
Thanks
Madhu
What do you mean by 'HDD Size'?
The name and size of the partitions inside the guest OS?
Or the size of the VMDK attached to the VM?
Hi LucD,
I am looking for following feilds
I am able to get the details of Powered On VMs but I would like to get the details of Powered Off VMs as well.
Please help.
Not too sure what you attached there?
That code does produce information for all VMs, independent of their powerstate.
Or are you looking for a complete new script to get the info you listed?
I have attached the current script, which I am using. It works fine for VMs which are Powered On but for Powered Off VMs, I am unable to get the HDD (Capacity) as it shows blank (zero)
Need you help, if attached script can be tweaked to get the details of Powered Off VMs or a new script.
When the VM is powered off for a longer time, that information, which is obtained through the VMware Tools, is not available.
No solution for VMs that are powered off for a longer time I'm afraid.
I am able to get the HDD Capacity of Powered Off VMs using
get-vm | Select Name,NumCpu,MemoryGB,UsedSpaceGB
But How do I get this added to my script, use above code only if the VMs are Powered Off else continue to current code
Those are 2 different measurements, the one under Guest is measured inside the guest OS, the one you just mentioned is measured from outside the guest OS.
For Powered Off, I am good with measured from outside the guest OS
Try the attached script.
When the VM is powered off, instead of the individual guest OS partitions, you will see 'All' in MountPoint column.