Find ESXi Installation Date with PowerCLI

I recently noticed a link to a very interesting article on Twitter: Find ESXi Installation Date — These steps are straight forward and show how to calculate the original ESXi install date, looking at the first section of the UUID. I didn’t realize so much useful information was coded into the UUID, but this could be useful information for certain reports. To understand the process, please check out the original article on

The following few lines of code will return this information for all hosts in a vCenter using PowerCLI.

# Find ESXi install date:
# Convert HEX to DEC:
# Convert epoch to date:

Get-VMHost | Sort Name | %{
  $thisUUID = (Get-EsxCli -VMHost $
  $decDate = [Convert]::ToInt32($thisUUID.Split("-")[0], 16)
  $installDate = [timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds($decDate))
  } # end custom object
} # end host loop
This entry was posted in Scripting, Virtualization. Bookmark the permalink.

One Response to Find ESXi Installation Date with PowerCLI

  1. Pingback: Newsletter: January 17, 2015 | Notes from MWhite

Leave a Reply

Your email address will not be published. Required fields are marked *