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
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.
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.
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.
I'm thinking the same thing RvdNieuwendijk. I've used this command a dozen times over the past two weeks without any issues.