Today I combined a couple of Powershell scripts which as a result gives a nice html formatted file with a table. This table contains all VM’s with their VMware Tools status and version. I’ve uploaded the script here. The outcome looks like the following:
As you can see, the VMware tools status is “ok” but the versions are totally out of line. I know there are already a few tools handling this but as far as I know none of them creates a text/html output file.
Daniel Hernandez says
I have yet to dig into performance issues with Powershell but currently have a VC with over 350 host and over 1500 VM’s and running any powershell across the entire farm times out.
I still require this data and decided to extract the same excat thing via Bash from a vmware communites post only thing I changed from the post was to execute the commands into a Varible and then echo the varible in a CVS format so I can pop into excel
http://communities.vmware.com/message/733192#733192
But thank you for sharing how you did it with Powershell.
james says
this is exactly what i’m looking for… but it doesn’t work!
get the following error for each VM passed down the pipe line:
Get-View : Cannot bind parameter ‘MoRef’. Cannot convert value “VirtualMachine-vm-25442” to type “VMware.Vim2.VimProxy.
ManagedObjectReference”. Error: “Invalid cast from ‘System.String’ to ‘VMware.Vim2.VimProxy.ManagedObjectReference’.”
At C:\tmp\vmTest.ps1:13 char:22
+ get-vm | % { get-view <<<< $_.ID } | select Name, @{ Name=”hostName”; Expression={$_.guest.hostName}}, @{ Name=”Tool
sStatus”; Expression={$_.guest.toolsstatus}}, @{ Name=”ToolsVersion”; Expression={$_.config.tools.toolsVersion}} | sort
-object name
Duncan Epping says
seems like a copy / paste problem with a ” sign or something like that? I tested it in several sites and it works fine here everytime.
Duncan