Server Stuck on Preparing to Configure Windows

This is not the first time that I experience the following issue in Windows Server 2008 R2 / Windows Server 2012, After you install updates or some roles / components, the server prompts you to restart. Then the message “Preparing to configure Windows. Do not shut down your computer” and the server hangs for hours. However, the server is accessible, but a number of services, including RDP, are not available.
As a general rule, in this case, the easiest way to resolve the problem is to perform a hard reset of the server. For example, you can remotely restart a physical server using HP ILO, Dell iDRAC, etc., or use Hyper-V / vSphere keyboards (if it is a virtual machine). However, it may adversely affect the operation of the operating system. It is best to use a “softer” method to reset the downtime server during reboot.
When server got stuck from long time on “Preparing to configure Windows Do not turn off your computer”. Don’t powering it off because it may be bad effect to your OS. Here have fix to get rid out of this. ITSUNIL.com

 Steps to Fix-
Logged into another server on same domain. Open Services console Right Click on Service (Local), then click on “Connect to another computer”

 Then enter the Hostname of the server that have the issue

 After successfully connected to the server navigate the “Windows Modules Installer” service, then you can see “Windows Modules Installer” service is in stopping mode.

 And was not allowing to Stop or Start.

 Open properties of “Windows Modules Installer” service to check the command that the service is executing.

 So ended up the “Trusted Installer” process we can use the following command,
Run command prompt as an administrator and run below command, instead of Hostname type your server Hostname which have problem.
taskkill.exe /s hostname /u corpadmin_name /p password /im TrustedInstaller.exe
if you have PSTools : same way you can use below command:
pskill.exe \hostname TrustedInstaller.exe 
 
Or PsExec:


psexec \hostname taskkill /IM TrustedInstaller.exe /F 

After that the server will rebooted successfully.

Also you may like: Windows Server 2012 R2 stuck in reboot cycle due to failed updates

Leave a comment