I'm looking for command in powershell/powercli to find uptime of my vcenters (windows and appliances based)
thanks
For the vCenter appliance, one can use the Get-VAMISummary function as explained in the below link -
https://www.virtuallyghetto.com/2017/01/exploring-new-vcsa-vami-api-wpowercli-part-1.html
For the vCenter on Windows (only if it is a virtual machine), you might have to rely on VM uptime information obtained from the vCenter -
Generate system uptime report of VMs using PowerCLI – Deans Blog
Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.
Cheers,
Supreet
You can try it from powershell
Get-CimInstance -ClassName win32_operatingsystem -ComputerName XXXX | select csname, lastbootuptime
or
Get-CimInstance -ClassName win64_operatingsystem -ComputerName XXXX | select csname, lastbootuptime
On the VCSA we use SNMP to get the Uptime.
Regards,
Joerg
For the vCenter appliance, one can use the Get-VAMISummary function as explained in the below link -
https://www.virtuallyghetto.com/2017/01/exploring-new-vcsa-vami-api-wpowercli-part-1.html
For the vCenter on Windows (only if it is a virtual machine), you might have to rely on VM uptime information obtained from the vCenter -
Generate system uptime report of VMs using PowerCLI – Deans Blog
Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.
Cheers,
Supreet