you should check this on the vcenter status bar for the VM farm, that will be much more easier.
I don't know a way to check it from the guest OS. But you can use PowerCLI or tools like RVtools for that.
Thanks for the replies, but what I was after was something I could put in a batch file to test if version was out of date
i'm afraid the only way is mentioned as above, either by powercli, vcenter only and not within the guest.
You could build a script around the following command, but you would need to hard code the current version. As others have stated there are other ways to query this. You can also set a VM to check the Tools version when it boots and to upgrade automatically.
C:\Program Files\VMware\VMware Tools>vmwaretoolboxcmd -v
8.3.1.954 (build-233645)
that gets you the version of vmware tools on the guest - but how do you know what version is available on the host to know if its up to date or not (we have many hosts all at different versions). Think I may have to give up with this one - many thanks for your replies.
Im a .vbs guy so.. you could do something like this too..
FilePath = "C:\Program Files\VMware\VMware Tools\vmwaretray.exe"
Set fso = CreateObject("scripting.filesystemobject")
MsgBox fso.GetFileVersion (FilePath)
You could then easily get from WMI too. Get from all VMs, drop in excel, could even compare to the highest version. Let me know if you want code for that, very easy. This could be done just as easily in PS I guess too..
I got:
8.0.2.14744 for 4.0 Update 1 tools
8.3.7.3827 for 4.1 Update 1 tools
Thanks - its what version do you compare against to know if the one on the guest is out of date - like you I have a range of versions which will show as up to date (or not) depending upon the host (currently 8.3.2.2658, 8.0.2.16474,7.4.6.5692 & 8.0.3.19531)
Here try this zip file (at own risk) but its just reads in a .txt file of your VMs
It just then just hooks to each VM
And dumps the tool version in Excel.
(it doesn’t check or have error handling at all, ie if your tools are installed someplace else, etc)
You must be a admin on the remote machine (as it using C$)
You must have Excel installed locally.
Since I have all my hosts on 4.1 Update 1 its easy for me.
But I guess if you have a mix of host versions (4.0, 4.0 U1, 4.1, 4.1 U1) not sure if you would want to update the tools on VMs beyond the host its running on.
In reality PS is the way to get all from vCenter.. Get the host version, have a table of host to tools version, and ensure then the tool version is at least the host version.
"My" method does not rely on vCenter server.
thanks again - but that just gives a list of the version of vmware tools on each guest - what I wanted to know was if it was out of date.
Not sure how old this is but this script just gets the max tools version and if tools is less than that, we know its old..
BUT I agree, the VMtools.exe knows, I assume from directly talking w/ the host if the tool is out of date or not..
I wonder how they are doing that?
ForEach ($VM in $VMs)
{
$MyVM = "" | Select-Object Name, ToolsVersion
$MyVM.Name = $VM.Name
$MyVM.ToolsVersion = $VM.Config.Tools.ToolsVersion
If (($MyVM.ToolsVersion -lt $MaxTools) -and ($MyVM.ToolsVersion -gt 0) -and ($VM.GuestHeartbeatStatus -eq "green"))
{
$BuildNumbers += $MyVM
$UpgradeFound = $True
}
}
Here is something from the VDK
http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/vsp41_vsdk_prog_guide.pdf
Page 106
Use the ToolsConfigInfo data object in VirtualMachineConfigSpec.toolsInfo property to specify the
settings for the VMware Tools software running on the guest operating system.
Humm...