VMware Cloud Community
JDLangdon
Expert
Expert
Jump to solution

Update VMware Tools?

Last night I ran the following powercli command with the hopes of updating the VMware Tools on some of my VM's without the VM rebooting.  The script seemed to run fine in that the tools did get updated correctly but unfortunately all the VM's were rebooted as soon as the update completed.

Can someone inspect my code and tell me what I have wrong?

Get-Content "c:\scripts\txt_files\VMs.txt" | Foreach-Object {Get-VM -Name $_ | Update-Tools -NoReboot -RunAsync }

Thanks,

Jason

0 Kudos
1 Solution

Accepted Solutions
RvdNieuwendijk
Leadership
Leadership
Jump to solution

Hi jason,

the script is good. In the help of the Update-Tools -NoReboot parameter is says:

Indicates that you do not want to reboot the system after updating VMware Tools. This parameter is supported only for Windows operating systems. NoReboot passes the following set of options to the VMware Tools installer on the guest OS:

/s /v"/qn REBOOT=ReallySuppress"

However, the virtual machine might still reboot after updating VMware Tools, depending on the currently installed VMware Tools version, the VMware Tools version to which you want to upgrade, and the vCenter Center/ESX versions.

It looks like you had a version of the VMware Tools that needed a reboot. Smiley Sad

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition

View solution in original post

0 Kudos
3 Replies
RvdNieuwendijk
Leadership
Leadership
Jump to solution

Hi jason,

the script is good. In the help of the Update-Tools -NoReboot parameter is says:

Indicates that you do not want to reboot the system after updating VMware Tools. This parameter is supported only for Windows operating systems. NoReboot passes the following set of options to the VMware Tools installer on the guest OS:

/s /v"/qn REBOOT=ReallySuppress"

However, the virtual machine might still reboot after updating VMware Tools, depending on the currently installed VMware Tools version, the VMware Tools version to which you want to upgrade, and the vCenter Center/ESX versions.

It looks like you had a version of the VMware Tools that needed a reboot. Smiley Sad

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
0 Kudos
julienvarela
Commander
Commander
Jump to solution

Hi,

Try something like this :

$vms= Get-Content "c:\scripts\txt_files\VMs.txt"

Foreach ($vm in $vms)

{

Get-VM -Name $vm | Update-Tools -NoReboot

}

Regards,

Julien.

Regards, J.Varela http://vthink.fr
0 Kudos
JDLangdon
Expert
Expert
Jump to solution

I'm thinking the same thing .  I've used this command a dozen times over the past two weeks without any issues.

0 Kudos