PowerCLI to get host ESXi version & Serial Number

Here is a handy bit of PowerCLI to return the VMhost Name, Product, ESXi build, Serial number of all hosts in vCenter. Get-Vmhost | Get-View | Sort-object Name | select Name, @{N=’Product’;E={$_.Config.Product.FullName}}, @{N=’Build’;E={$_.Config.Product.Build}}, @{Name=”Serial Number”; Expression={($_.Hardware.SystemInfo.OtherIdentifyingInfo | where {$_.IdentifierType.Key -eq … Continue reading