Preparing to configure Windows. Do not turn off your computer…. Time to kill a remote process!

Posted on 16/03/2015 · Posted in Microsoft, Miscellaneous

Now and then, when installing Windows Updates, the server hangs and just refuses to shut down. You will see a message on the screen as following “Preparing to configure Windows. Do not turn off your computer…”, and it won’t shutdown. Prashant Deshpande wrote an excellent guide back in 2011 which is still valid here, but it relies on a software called Remote Process Explorer, which does have a free 30 day trial. It’s a fine peice of software, but if this is the only thing you want to do, then it’s probably a waste of money as you can do the same thing with Windows built-in tools. Now this does mean that you need to handle command prompt, but I would assume this isn’t a problem for you.

tasklist /s

locate C:\windows\servicing\trustedinstaller.exe in your task list and make note of the PID it has. To kill the process you need a second command:

taskkill /s /pid NNN

And that’s it, the process has been killed and your server should now reboot as intended.