Skip navigation

Sharing you my script display the VMware tools version and status

 

From a Host or cluster level

Get-VM -Location "pit-esx33.sj” | % { get-view $_.id } | 
Select Name, @{Name=“ToolsVersion”; Expression={$_.config.tools.toolsversion}}, @{ Name=“ToolStatus”; Expression={$_.Guest.ToolsVersionStatus}} | Sort-Object Name

 

From a VM list

$vmNames = Get-Content -Path D:\vmNames.txt
Get-VM -Name $vmNames | % { get-view $_.id } | select Name, @{Name=“ToolsVersion”; Expression={$_.config.tools.toolsversion}}, @{ Name=“ToolStatus”; Expression={$_.Guest.ToolsVersionStatus}} | Sort-Object Name

Sharing you my script that exports VM's Guest OS, host, compatibility version, IP address, VMware tools version and its status into a CSV format.

 

# $vmNames = Get-Content -Path D:\vmnames.txt | Get-VM -Name $vmNames | VMList #VM-level
# Get-VM -Location "pit-esx16.sj” |  #Host-level
Get-VM -Location "PIT_Cluster_Production” | #Cluster-level

Select  Name, PowerState,
@{Name="Host"; Expression={$_.VMHost.Name}},
@{Name="Running OS"; Expression={$_.Guest.GuestFullName}},
@{Name=”Tools Version Status”; Expression={$_.Guest.ToolsVersionStatus}},
@{Name=”Hardware Version”; Expression={$_.Config.Version}},
@{Name=”Tools Status”; Expression={$_.Guest.ToolsStatus}},
@{Name="IP Address"; Expression={$_.Guest.IPAddress}} | Sort-Object Name | Export-CSV D:\PIT\cluster-output.csv –NoType

Filter Blog

By date: