VMware: Update VMware Tools without a reboot by PowerCLI
Upgrade VMware Tools, all virtual machines in cluster:
Get-Cluster "Productie" | Get-VM | Update-Tools –NoReboot
Upgrade VMware Tools, located in folder:
Get-Cluster "Productie" | Get-Folder "Beheer servers" | Get-VM | Update-Tools –NoReboot
Upgrade VMware Tools, selected virtual machine:
Get-Cluster "Productie" | Get-VM "BHR-SVR11" | Update-Tools –NoReboot
Get VMware-Tools versions:
Get-View -ViewType VirtualMachine | select Name, @{ Name=”ToolsVersion”; Expression={$_.config.tools.toolsVersion}}
Hi Sander, great info.. Just wanted to try and update my VMware Tools on a server running VMware Tools 4.0.0 #261974 from vSphere 4.0 U2
to
VMware Tools 8.3.7 #341836 from vSphere 4.1 U1
Update-Tools : 29-07-2011 22:34:27 Update-Tools The operation for the entity VirtualMachine-vm-260 failed wit
h the following message: “The operation is not supported on the object.”
At line:1 char:64
+ Get-Cluster “C1” | get-vm dc2 | Update-Tools <<<< -NoReboot + CategoryInfo : NotSpecified: (:) [Update-Tools], NotSupported + FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_OperationFailed,VMware.VimAutomation .ViCore.Cmdlets.Commands.UpdateVmTools Any Ideas - to much for the -NoReboot command 🙂 -Jonas, Denmark
Same error without the -NoReboot command..
@Jonas
Some time ago i had a similar issue with some other commands.. after installing Powershell 2 + .NET Framework 2.0 SP1 it was gone.
Make sure you’ve got the latest PowerCLI 4.1 version and indeed the latest .NET Framework
The PowerCLI code in this article I tested and working smooth, thanks!
Thanks, used this code to upgrade 200 Windows VM’s. Thanks for sharing!
Thanks Sander
the commandline is not working for me. i am using the latest powercli version.
The Error output is “The pipeline has been stopped”
Get-VM | Get-View | Where-Object { ($_.Guest.GuestFamily -eq “windowsGuest”) -and ( $_.Guest.GuestState -eq “running” ) -and ( $_.Guest.ToolsStatus -eq “ToolsOld” ) -and ( $_.Name -ne “XXXXXXXXX” ) } | Get-VIObjectByVIView | Update-Tools -NoReboot
Seems that there is a problem with the Get-VIObjectByVIView Command
Any ideas???
thx
Jonas and Aurele, make sure you’re running PowerCLI 4.1
I runned the script again without errors
Hi, This is wonderful, without down time we did. Thanks . For kind information for ESXi5 need to update Power CLI 5.0.
Hi, i need a script to fetch the VMs detail where VMtool is out-of-dated and without reboot i can update it
Hi, i am getting error message when using the above command to update VMware tools, My PowerCli version is 5.5
Kindly help me
Cool, thanks
Hey guys, this is great, I tried the s ript, against my vm list, it ran great, but only one VM at a time, is there a way to have all vm in my vm list udate at the same time?
K