From time
to time a client of mine asks about a way of listing the VMware Tools Version
of his VMs for the sake of checking which ones are out of date.
Is there anything
better than a script for the job ?!?!?!
For not
having to poke around next time a client asks me about it again, I will post a
simple script here, one that I have tested and I know it will get the job done.
Yeah I know
there are plenty of scripts out there, ones more sophisticated than others, but
this post is more for my own records. Don’t get me wrong ; )
It’s a
powerCLI script, if you don’t know how to use it I recommend you read the
basics here.
This script
will get the VMware Tools version of ALL VMs of your environment and exclude the
templates from the result.
Get-View
-ViewType VirtualMachine -Property Name,Config.Tools.ToolsVersion -Filter
@{"Config.Template" = "False"} | `Select-Object Name,@{N="ToolsVersion";
E={$_.Config.Tools.ToolsVersion}}
As you can
see on the example above, for version 0 you get the ones which did not get
VMware Tools installed at all, for the big numbers you get the ones provided by
3rd partys, probably the virtual appliances you have deployed.
There’s
also an option to get the ToolsVersionStatus, but IMHO, I see not point on
getting this information, this status is based on the comparison of the VMware
Tools version installed on the guest with the version available on the host. If
your host is out of date, your VM’s status would be
listed as Current, even though it could be some versions behind.
So, my
advice is to identify the latest tools version number and use it as a baseline
for your comparison.
If you want
to reduce the scope of your search you can also use commands like
Get-Datacenter, Get-Cluster or Get-VMHost to reduce the surface of search.
Got get
them tiger !!!