VMware Cloud Community
Chrisxxxx
Contributor
Contributor

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!

-Chris

0 Kudos
2 Replies
Madmax01
Expert
Expert

Hello,

So for the commands you could use:

for example:

$vc = connect-viserver xxxx

$vc.version

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

$instance.content.about

theire you have now more infos

and for vm for example you get like that

$vm = get-vm xxxxxx |get-view

$vm.config.version

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

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200724...  (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

Max

0 Kudos
Madmax01
Expert
Expert

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

max

0 Kudos