VMware VM uptime

Doodad Boy
Doodad Boy used Ask the Experts™
on
i am using below powercli command to grab all vm uptime

Get-Stat -Entity VMNAME -Stat sys.uptime.latest -Realtime -MaxSamples 1

Then i getting the VM uptime in the output

How to display the VM name itself along with the uptime output
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Maybe:
Get-Cluster <cluster-name> | Get-VM | `  
  Get-Stat -Stat sys.uptime.latest -MaxSamples 1 -Realtime | `  
  select Entity, Value, Unit  
or
Get-Host <Host-name> | Get-VM | `  
  Get-Stat -Stat sys.uptime.latest -MaxSamples 1 -Realtime | `  
  select Entity, Value, Unit

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial