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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s