PowerCLI oneliner to generate version, build and bios details

Here’s a quick oneliner to generate a nice report about the version, build and bios details on each host.

Get-VMHost | Select-Object -Property Name,Version,Build,@{Name='BIOS Version';Expression={(($_|Select-Object -ExpandProperty ExtensionData).Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo | ?{$_.Name -like "*bios*"}).Name.Split(' ')[4]}}

PS: there are no spaces or new lines in the code.

Enjoy!

Advertisements