Highlighted
Contributor
Contributor

Upgrading VMware tools without rebooting

Jump to solution

I need a script to upgrade VMware Tools without rebooting.

Please give me a script to upgrade one VM only, so that I can test first

0 Kudos
25 Replies
Highlighted
Contributor
Contributor

could you please post the full script , i am also want to update the vmtools with out reboot on 50 VM systems

0 Kudos
Highlighted
Hot Shot
Hot Shot

Here's everything I did...

1)  Created the NoRebootToolsUpdate.ps1 script.

2)  Created my norebootserverlist.txt that contained the VM names I wanted to update.

3)  Created a Windows Scheduled Task to execute the script on a set time/date.

Thanks to everyone's advice!

================================
Sample 'NoRebootToolsUpdate.PS1'
================================

# Set Virtual Center Servername
$VIServer = "VISERVERNAME"

# Add VMware PowerShell Snapin
Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue

# Connect to Virtual Center
connect-viserver $VIServer

# Pulls server names from NoRebootServerList.txt & for each name in the list, execute the Update-Tools with noreboot line.
Get-Content .\NoRebootServerList.txt | ForEach-Object { Update-Tools -VM $_ -NoReboot -RunAsync }

# Disconnect from Virtual Center
$VIServer | Disconnect-VIServer -Confirm:$false

===================================================================
Sample 'NoRebootServerList.txt'
Note, servername is the VC Object Name of the VM you wish to update
===================================================================

servername1
servername2
servername3
servername4


========================================================
Sample 'UpdateTools.CMD'
Use this command to execute the above PowerCLI code from
a Windows Scheduled Task
========================================================

powershell -command "& .\noreboottoolsupdate.ps1"

0 Kudos
Highlighted
Contributor
Contributor

Team,

Is it recommended to upgrade a VMtool without restart ? As it will upgrade the drivers, it's always recommended to restart the Server from Microsoft perspective... AM i right ?

Please suggest....

0 Kudos
Highlighted
Enthusiast
Enthusiast

i use this command to update tools but for 64 bit guest its fails ..

is there a way to update guests having 64 bit windows?

0 Kudos
Highlighted
User Moderator
User Moderator

Yes, ultimately you will need a reboot.

We let those coincide with the monthly security patches reboot.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Highlighted
User Moderator
User Moderator

Any error messages ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos