Upgrading VMTools with PowerCLI

Posted by Stephan McTighe on 6 Dec 2023

I recently got asked if it is possible to upgrade the VMTools on a VM at the VM level and target a group of them, but not at a host or cluster level. The answer is yes.

There are multiple ways to handle VMtools upgrades/patching. Below I will show how it can be done via the UI and also using PowerCLI where you can target an array of VM objects.

Firstly, lets take a look at the process using the GUI.

Now lets looks at using PowerCLI.

This uses a single VM as an example, but this could easily be modified to utilise an array of VM’s based on a selection criteria such as Name, Tag, Folder etc. Something like this:

1$vms = Get-TagAssignment | Where-Object {$_.Tag -like '*app1*'} | Select-Object Entity
2
3foreach ($vm in $vms) {
4    Get-VM -Name $vm.Entity | Update-Tools
5}

As always, thanks for reading!

If you like my content, consider following me on Twitter so you don’t miss out!