Tuesday, January 2, 2018

Get VMX and VMWare tools version and export to CSV

To get the VMware tools versions and export it to a csv called vmtools.csv

get-vm | where {$_.powerstate -ne "PoweredOff" } | where {$_.Guest.ToolsVersionStatus -ne "guestToolsCurrent"} | % { get-view $_.id } | select Name, @{ Name="ToolsVersion"; Expression={$_.config.tools.toolsVersion}}, @{ Name="ToolStatus"; Expression={$_.Guest.ToolsVersionStatus}} | Export-Csv -NoTypeInformation -UseCulture -Path d:\vmtools.csv

No comments:

Post a Comment

Thank you for your comment.