Determine ESXi / ESX host versions

How often are you looking to see if all your ESX hosts are at the same revision level?  Did one get left behind, or did someone run odd updates against one and you are trying to figure out the out one out?

This is very easy to find via PowerCLI.  Once you are authenticated to one or many vcenter instances (connect-viserver) you can run one of the following commands – it really depends how much data you want to capture.

getview ViewType HostSystem -Property Name,Config.Product | select Name,{$_.Config.Product.FullName}
This will give you output similar to:
Name $_.Config.Product.FullName
—- ————————–
mnepesx35p.corporate.ltcg.com VMware ESXi 6.0.0 build-3825889
mnepesx22-p.corporate.ltcg.com VMware ESXi 6.0.0 build-3825889

or

getview ViewType HostSystem -Property Name,Config.Product | foreach {$_.Name, $_.Config.Product}
This will give you output similar to:
Name : VMware ESXi
FullName : VMware ESXi 6.0.0 build-3825889
Vendor : VMware, Inc.
Version : 6.0.0
Build : 3825889
LocaleVersion : INTL
LocaleBuild : 000
OsType : vmnix-x86
ProductLineId : embeddedEsx
ApiType : HostAgent
ApiVersion : 6.0
InstanceUuid :
LicenseProductName : VMware ESX Server
LicenseProductVersion : 6.0

Both could be tagged with a >filename at the end if you wish to save to a file versus output to the console screen.

 



Credit to vmdev.info’s post found here.

 

Advertisements