new1234.jpg
Home > VMware > VMware: Update VMware Tools without a reboot by PowerCLI

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}}

image

More information: VMware , VMware

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

  1. Jonas
    July 29th, 2011  (Quote) at 21:36  (Quote) | #1

    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

  • Jonas
    July 29th, 2011  (Quote) at 21:37  (Quote) | #2

    Same error without the -NoReboot command..

  • rene
    August 1st, 2011  (Quote) at 09:46  (Quote) | #3

    @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.

  • Tanya
    August 1st, 2011  (Quote) at 15:53  (Quote) | #4

    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!

  • Evan
    August 9th, 2011  (Quote) at 11:26  (Quote) | #5

    Thanks, used this code to upgrade 200 Windows VM’s. Thanks for sharing!

  • Pieter Kuiper
    August 21st, 2011  (Quote) at 03:28  (Quote) | #6

    Thanks Sander

  • Aurele
    August 23rd, 2011  (Quote) at 12:08  (Quote) | #7

    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

  • September 16th, 2011  (Quote) at 08:16  (Quote) | #8

    Jonas and Aurele, make sure you’re running PowerCLI 4.1

    I runned the script again without errors

  • Saravanan
    March 11th, 2012  (Quote) at 06:53  (Quote) | #9

    Hi, This is wonderful, without down time we did. Thanks . For kind information for ESXi5 need to update Power CLI 5.0.

  • Kuldeep
    March 18th, 2015  (Quote) at 00:46  (Quote) | #10

    Hi, i need a script to fetch the VMs detail where VMtool is out-of-dated and without reboot i can update it

  • Muthu
    July 19th, 2015  (Quote) at 08:30  (Quote) | #11

    Hi, i am getting error message when using the above command to update VMware tools, My PowerCli version is 5.5
    Kindly help me

  • Shigeko
    December 21st, 2015  (Quote) at 01:05  (Quote) | #12

    Cool, thanks

  • K
    March 25th, 2016  (Quote) at 04:07  (Quote) | #13

    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

    1. No trackbacks yet.