I hit a problem today where a server was stuck installing Windows Updates.  Now I’m not going to cover the update problem itself as this is going to be the topic of another post, but instead I’m going to give a solution to restart the server that doesn’t involve the power button!

This was a recurring problem with the server – every time it would try and update it would get stuck like this for around 24 hours.   Eventually it’d fail the update and restart and everything would be back to normal.

During this hung update, the server would respond to file share requests, but there was no way to remote into it.

The solution was to kill off the windows update process.

I first tried to do this via the service, but I couldn’t stop it as it was already in the “stopping” state.

Luckily I could still remotely execute command on the box, so the following did the trick:

sc queryex wuauserv

Once I had the PID (Process ID) I could then kill the task with the following:

taskkill /PID [process ID] /F

Now this should only be used as a last resort, as there is the potential for the update to get corrupted and stop the server from booting. But it’s still better than a long held power button if you have no other choices!