WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • 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. *protectedMatt 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. *protectedStan 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

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

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 © 2025

 

Loading Comments...