Skip to content

Instantly share code, notes, and snippets.

@vmwarecode
Created July 4, 2016 00:40
Show Gist options
  • Save vmwarecode/15bc981327629ff119b376f1c144d9ea to your computer and use it in GitHub Desktop.
Save vmwarecode/15bc981327629ff119b376f1c144d9ea to your computer and use it in GitHub Desktop.
Update tools in bulk
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