Author Posts

May 25, 2016 at 9:43 am

Hi,
I am looking for script which will give me all VM's which are having vmware tools outofdate & hardware version.

I wrote a script, but not able to get hardware version:
Get-VM |
Where-Object {$_.ExtensionData.Guest.ToolsStatus -ne "toolsOk"} |
Select-Object -Property Name,
@{N="ToolsStatus";E={$_.ExtensionData.Guest.ToolsStatus}},
@{N="OSFullName";E={$_.Guest.OSFullName}}

Can someone please help me on this?

-Kalyan

May 25, 2016 at 11:35 am

Just will need to add the Version property to get the hardware version to your select-object

Get-VM |
 Where-Object {$_.ExtensionData.Guest.ToolsStatus -ne "toolsOk"} |
 Select-Object -Property Name, Version,
 @{N="ToolsStatus";E={$_.ExtensionData.Guest.ToolsStatus}},
 @{N="OSFullName";E={$_.Guest.OSFullName}}