Created
July 4, 2016 00:40
-
-
Save vmwarecode/15bc981327629ff119b376f1c144d9ea to your computer and use it in GitHub Desktop.
Update tools in bulk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-PSSnapin Vmware* -ErrorAction SilentlyContinue | |
Set-PowerCLIConfiguration -ProxyPolicy NoProxy -Confirm:$false | |
echo "Connect to ESX Server..." | |
Connect-VIServer -Server "10.1.2.3" -User "root" -Password 'pwd' | |
Get-VM | where { $_.PowerState -eq “PoweredOn” -and $_.Guest.IPAddress -ne $null -and $_.Guest.ToolsVersion -ne $null -and $_.Guest.ToolsVersion -ne ""} | update-tools -RunAsync:$false | |
Disconnect-VIServer -Server * -Force -Confirm:$false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment