VMware powerCli Commands
Open powercli and connect Vcenter using following command
connect-viserver vcenter.domain.com
list of VMware Tools
get-vm | % { get-view $_.id } | select Name, @{ Name="ToolsVersion"; Expression={$_.config.tools.toolsVersion}},@{ Name="ToolStatus"; Expression={$_.Guest.ToolsVersionStatus}}
list of the Vmware tools on each powered on virtual machine
get-vm | where {$_.powerstate -ne "PoweredOff" } | % { get-view $_.id } | select Name, @{ Name="ToolsVersion"; Expression={$_.config.tools.toolsVersion}},@{ Name="ToolStatus"; Expression={$_.Guest.ToolsVersionStatus}}
list of the Vmware tools that are not up to date on each powered on virtual machine
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}}
you can using the following expression to output to CSV to all commands
| Export-Csv -NoTypeInformation -UseCulture -Path C:\output.csv
Comments
Post a Comment