WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / Super easy way of getting ESXi installation date in vSphere 6.5

Super easy way of getting ESXi installation date in vSphere 6.5

10.30.2016 by William Lam // 2 Comments

Sometimes it is the small updates which improves an existing feature or enhances the current user experience that I most appreciate with a new vSphere release. One area that I recently came across while working with vSphere 6.5 is just how easy it is now to retrieve the ESXi installation date which can be useful for troubleshooting or auditing purposes. This previously required you to decode the ESXi UUID which was needed to construct the originally installation date as outlined in this VMware KB 2144905 article.

With ESXi 6.5, you can now quickly retrieve the ESXi installation date simply by using this new ESXCLI command:

esxcli system stats installtime get

esxcli-6-5-installation-date-2
Note: ESXCLI can be executed either locally within the ESXi Shell or remotely using vCLI or PowerCLI.

In case that was not enough, the Engineer who added this capability was also kind enough to add a native vSphere API to also retrieve the ESXi installation date from a programmatic approach. Under the existing ImageHostConfigManager there is now a new vSphere 6.5 API called installDate() which returns the installation date in UTC format.

To demonstrate this new vSphere API, I have created a small PowerCLI function called Get-ESXInstallDate which can be downloaded from here.

Here is an example of retrieving the installation date for a specific ESXi host:

esxcli-6-5-installation-date-1

More from my site

  • When to use Move-VM cmdlet vs xMove.ps1 script for performing Cross vCenter vMotions?
  • PowerCLI module for Proactive HA (including simulation)
  • Custom script bundle is now possible with Auto Deploy in vSphere 6.5
  • New vSphere 6.5 APIs worth checking out
  • Configure new automatic Space Reclamation (VMFS UNMAP) using vSphere 6.5 APIs

Categories // Automation, ESXi, vSphere 6.5 Tags // esxcli, esxi 6.5, PowerCLI, vSphere 6.5, vSphere API

Comments

  1. Matt Mancini says

    11/01/2016 at 9:37 am

    This is a great feature, can't tell you how many times I've needed this. Also, this command sounds like a great VCP question to me 🙂

    Reply
  2. Stan Jurena says

    11/03/2016 at 12:35 am

    Hi Matt, I'm not sure what is giving you an impression that putting commands into the VCP or any certification is a great idea. Only option I would personally agree with would be "Provide a command to show time when the esxi server was installed" while providing a fully working esxi system in parallel.
    Today there is no need to remember any commands, you have google or anything else all the time available - you just need to understand the logic of the system. Not 200 commands to do particular things.
    Stan

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...