Hi Folks,
Recently our Compliance team asked to provided esxi installation date of each esxi in vcenter available. After googling found VMware KB article Determining the installation date of an ESXi host (2144905) | VMware KB it gives only for one single esxi. How do we generate report (csv)for all esxi added in vCenter which will shows its installation date. This will save our manually login to all esxi and finding the installation date. Any script will help us.
Thanks in advance
PS 🙂
You haven't specified the ESXi version you are using.
You can try below Using PowerCLI.
From this blog(Find ESXi Installation Date with PowerCLI | EnterpriseAdmins.org) I got the below script and working fine on ESXi 5.5
# Find ESXi install date: http://vcdx56.com/2016/01/05/find-esxi-installation-date/
# Convert HEX to DEC: http://michaelflanakin.com/Weblog/tabid/142/articleType/ArticleView/articleId/1073/Converting-ToFrom...
# Convert epoch to date: http://stackoverflow.com/questions/10781697/convert-unix-time-with-powershell
Get-VMHost | Sort Name | %{
$thisUUID = (Get-EsxCli -VMHost $_.name).system.uuid.get()
$decDate = [Convert]::ToInt32($thisUUID.Split("-")[0], 16)
$installDate = [timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds($decDate))
[pscustomobject][ordered]@{
Name="$($_.name)"
InstallDate=$installDate
} # end custom object
} # end host loop
If you are having ESXi 6.5 then you can go through this link: http://www.virtuallyghetto.com/2016/10/super-easy-way-of-getting-esxi-installation-date-in-vsphere-6...
Thanks siva for reply
We have esxi version of 5.1 /5.5 and 6.0 in datacenter
Will this script work, actually not yet tried on other version of esxi will check in some time .
Thanks
PS