Generate system uptime report of VMs using PowerCLI

It is possible to return the system uptime of your VMs by retrieving the last statistical information for the metric ‘sys.uptime.latest’ in realtime using PowerCLI. For Example, to return the metric for the virtual machine ‘VM1’ we could run the following command: Get-Stat -Entity VM1 -Stat sys.uptime.latest -Realtime -MaxSamples 1 This will return the uptime … More Generate system uptime report of VMs using PowerCLI

Retrieve statistical information for all virtual machines in a object level hierarchy

So the challenge was to obtain stats from a collection of all virtual machines in a particular object hierarchy within vCenter, this being either the datacenter, cluster, resource pool or folder level. The requirement was to capture all metrics that are for each virtual machine for a 24 hour period, using the closest available statistical interval (default value of … More Retrieve statistical information for all virtual machines in a object level hierarchy