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 -Namen $vmNames | VMList # Get-VM -Location "pit-esx16.sj” | #Host-level Get-VM -Location "PIT_Standalone_Production” | #Cluster-level Get-View | 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