Upgrading VMware Tools Without a Reboot Using PowerCLI

Historically, one of my biggest little annoyances with a VMware version upgrade has been upgrading VMware tools. In vSphere 5.5, VMware added the ability to update tools without a reboot. If you were manually kicking off the tools upgrade all you need to do is enter the following features into the advanced settings box

/s /v"/qn REBOOT=ReallySuppress?

This is great and causes the tool update to only lose one ping instead of requiring a full restart. Manually kicking off the update is a drag, though. Luckily there’s a handy one line PowerCLI command that can grab a set of VMs and update tools for you.

Get-Cluster "Lab Hosts" | Get-VM | Where-Object {$_.Name -notlike "*SQL*" -and $_.Name -notlike "*DB*"} | Update-Tools -NoReboot

In this example I chose my Lab Hosts cluster and updated tools on all VMs that don’t have SQL or DB in their names. Pretty simple but really cool to automate away an hour of wasted clicks.

Speaking of PowerCLI, version 6.5 recently released. The major change revolves around switching from a snapin architecture to a module architecture. Kyle Ruddy explains the details behind the change in a VMware blog article. Long story short, snapins are out and modules are much easier to update and work with. Many users won’t notice a difference. I ran into some really annoying problems because I use ISE and created a profile. My profile referenced snapins so ISE wouldn’t work. The above article explains exactly how to fix the problem and adapt to the modern age.