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
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: