How to determine the latest supported VM hardware version using PowerCLI

  I'd like to check for VMs with out of date hardware versions (easy to do) and would prefer to pull the latest support version from the vCenter server instead of setting it manually.  While we're in between v5.1 an v5.5 I want to the script to know automatically what to compare against.  I could check the vcenter version against a hash table of vcenter and hardware version, but even that requires manual intervention to populate and maintain when the next version of vSphere comes out.  I'm assuming it involves Get-View, but I don't know which object I should be looking in.

  Anyone have an idea?  Thanks!


0 Kudos
2 Replies


So for the commands you could use:

for example:

$vc = connect-viserver xxxx


theire you get for example  (5.5)

if you like more info about center then you could query instead of $vc.version

$instance = get-view serviceinstance


theire you have now more infos

and for vm for example you get like that

$vm = get-vm xxxxxx |get-view


if you like to have split "vmx-"  then do $vm.config.version.split("vmx-")[4]

with that you could easy create a short script where you make a loop against all vm's in the you're vCenter.

So and if 5.5 is the Version you have of you're vCenter you could easy filter   vm's  which are not matching the   "10" Smiley Wink  (good info for the version support and what is working Smiley Wink).

PS: i'am not quit sure if this info is hiddin somewhere in the API to query against the latest supported version. not quit sure.

Best regards


0 Kudos

but its important to query mainly the versions of ESX/i

because if you have vcenter 5.5 and Esxi is 5.1 then latest supportat vHW is based on the esxi version. So means now v9 maximum.

BEst regards


0 Kudos