Tonight, I scheduled Windows Updates on a customer’s server, and decided to sit through the process myself.
After the 1.9GB of downloads to support 31 updates had downloaded and installed, I pressed the “Restart” button on the Windows Update dialogue box, and waited.
And waited.
And waited.
Normally, this server is responsive to Remote Desktop connections after seven minutes. At thirteen, I was concerned. At twenty minutes, I decided to connect to another server on the same network to investigate.
Using Server Manager’s “Connect to Computer” feature, I was able to look at the Services running on the target server. It was up and running, but not responding to Remote Desktop. I restarted the RDC-related services, but still had no joy.
Then I saw that the TrustedInstaller service had failed. It was stuck in “Stopping” mode, which meant I’d have to manually terminate the service to continue the shutdown.
But now I’d have to download PsTools from SysInternals, until I realised that if the server was still running, I could simply connect to the hidden C$ share to grab the files from my user directory.
A few seconds later, I was staring at a command prompt.
First I tried to run it all from one command. I would use psexec to call pskill remotely, to terminate the Windows Installer service.
Eventually I got bored with fighting the commands, and referred to the help on the PsExec page. In order (with appropriate username and password entered), I did the following:
psexec \\remoteserver cmd
pskill TrustedInstaller
As soon as I pressed Enter, the Server Manager window in the background informed me that the server was unresponsive due to a shutdown, and sure enough, the server rebooted and responded to Remote Desktop again shortly thereafter.
Thank you, Mark Russinovich, for PsExec and PsKill.