ESXi host installation date :
<# .NOTES **************************************** Created by: Rajiv Pandey Web URL: www.vthesis.wordpress.com **************************************** .DESCRIPTION It will display the installation date of an ESXi host . #> Function Get-ESXInstallDate { param( [Parameter( Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true) ] [VMware.VimAutomation.ViCore.Impl.V1.Inventory.InventoryItemImpl]$Vmhost ) if($Vmhost.Version -eq "6.5.0") { $imageManager = Get-View ($Vmhost.ExtensionData.ConfigManager.ImageConfigManager) $installDate = $imageManager.installDate() Write-Host "$Vmhost was installed on $installDate" } else { Write-Host "ESXi must be running 6.5" } }
Thanks hope you like it.
Rajiv Pandey.