Psxec.exe and wusa.exe can be used to remotely install updates on a server, when you don’t have any kind of console access. This could also be used on a server core installation, or where you wanted to quickly deploy a patch to multiple machines.
I was recently in a situation with a couple of servers where ILO was not working due to a firewall issue, and SP1 for Windows Server 2008 R2 had broken RDP, requiring the RDP hotfix Windows6.1-KB2667402-v2-x64.msu (http://support.microsoft.com/kb/2667402). So I had to install the hotfix but had no console access.
In this case you can use a combination of psexec.exe – a sysinternals utility for executing commands remotely (http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx), combined with wusa.exe, the Windows Update Stand-alone Installer (http://support.microsoft.com/kb/934307). You can do this as follows:
- Copy the hotfix to the drive of the machine you want to install the patch on e.g. to c:\temp
- Download psexe.exe to a machine which you do have access to.
- Run the command:
D:\Scripts\psexec.exe -s \\server wusa.exe "c:\temp\Windows6.1-KB2667402-v2-x64.msu" /quiet
Note the following:
- Look in the Setup eventlog for results.
- Add the /norestart switch if you do not want the remote machine to reboot automatically after the patch install.
- If the command exits with Error code 1641, that is a success and the machine should reboot if it needs to.
- The –s switch for psexec runs with required permissions.