VMware Cloud Community
PandzicM
Contributor
Contributor
Jump to solution

Uptime on vcenters

I'm looking for command in powershell/powercli to find uptime of my vcenters (windows and appliances based)
thanks

0 Kudos
1 Solution

Accepted Solutions
SupreetK
Commander
Commander
Jump to solution

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

View solution in original post

0 Kudos
3 Replies
RajeevVCP4
Expert
Expert
Jump to solution

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

Rajeev Chauhan
VCIX-DCV6.5/VSAN/VXRAIL
Please mark help full or correct if my answer is use full for you
0 Kudos
IRIX201110141
Champion
Champion
Jump to solution

On the VCSA we use SNMP to get the Uptime.

Regards,

Joerg

0 Kudos
SupreetK
Commander
Commander
Jump to solution

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

0 Kudos