VMware Cloud Community
denjoh44
Enthusiast
Enthusiast

Powershell - update manager

I have to update vmwaretools on more than 5000 servers

I do not manage to make an udpdate d 'une vm with update manager with orders powershell

would you have the list of orders powershell to be carried out (to be execute) ?

With a vcname and a list of vm it paramétre

I do not speak English very well

0 Kudos
2 Replies
MartinAmaro
Expert
Expert

They are many ways you can update the tools

1.- Enable the policy so the VM will update the VMware tools at power-on

2.- install without a reboot

3.- Install and reboot (you can script this or select all (or a few) from Virtual center and right click and chose to upgrade tools

However I will recommend using powercli or powershell to enable the policy so when the windows admins chose to reboot server during schedule maintenance it will update the tools as needed.

connect-viserver -server "yourVIserver"

Get-VM | foreach-object {

$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec

$vmConfigSpec.ToolsConfigInfo = New-Object VMware.Vim.ToolsConfigInfo

$vmConfigSpec.toolsUpgradePolicy = "upgradeAtPowerCycle"

(Get-View $_.ID).ReconfigVM($vmConfigSpec)

}

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful.
0 Kudos
maishsk
Expert
Expert

You can also use the Update-Tools

Get-VM | update-tools -NoReboot



Maish

VMware Communities User Moderator

Virtualization Architect & Systems Administrator

- @maishsk

Maish Saidel-Keesing • @maishsk • http://technodrone.blogspot.com • VMTN Moderator • vExpert • Co-author of VMware vSphere Design
0 Kudos