Script

----------------------------------------------------------------------------------------

Connect-viserver vCentername
Get-VMHost | Select Name,PowerState,ConnectionState,Manufacturer,Model,Version,Build, @{N = 'Serial' ; E= { (Get-EsxCli -VMHost $_).hardware.platform.get().SerialNumber}}