Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows Server 2008 R2 / Fix: Server Stuck on “Preparing to Configure Windows”

September 27, 2017 Windows Server 2008 R2Windows Server 2012 R2

Fix: Server Stuck on “Preparing to Configure Windows”

It is not the first time when I come across the following issue in Windows Server 2008 R2 / Windows Server 2012/R2: after the installation of updates or some roles/components, a server prompts to be restarted. Then the message “Preparing to configure Windows. Do not turn off your computer” appears and the server gets stuck for hours. However,  the server is accessible, but a number of services, including RDP, are unavailable.

As a rule, in this case the easiest way to solve the problem is to perform server hard reset. For example, you can restart a physical server remotely using HP ILO, Dell iDRAC etc., or using Hyper-V / vSphere consoles (if it is a virtual machine). However, it may negatively affect the OS operation. It is better to use a more “soft” way to reset the server stuck while rebooting.

Preparing to configure Windows. Do not turn off your computer

From another computer using the Services snap-in  (services.msc), connect to the stuck server remotely.

connecting services on remote computer

In the list of services of the server, it is easy to find Windows Modules Installer in the Stopping state. Obviously, this service prevents the server from performing the correct reboot.

Windows Modules Installer service in stopping state

At the same time, the service control buttons are inactive. In the properties of the service, you can find the name of the executable: C:\Windows\servicing\TrustedInstaller.exe

C:\Windows\servicing\TrustedInstaller.exe

Our task is to force this process to stop. The easiest way to use the script described in the article How to kill a Windows service stuck on stopping bearing in mind that you will have to do all steps remotely.

On any computer, open the command prompt and run the following command for the server called lon-man02 to stop the TrustedInstaller.exe process .

taskkill.exe /s lon-man01 /u corp\admin_name /p P@ssw0rd! /im TrustedInstaller.exe

The same can be done using Pskill from PSTools:

pskill.exe \\lon-man01 TrustedInstaller.exe

Or PsExec:

psexec \\lon-man01 taskkill /IM TrustedInstaller.exe /F

After that the message Shutting down will appear on the screen of the hung server, and in some moments it should reboot correctly.

Shutting down windows message

This issue appears not only on server Windows versions, but also on client Windows 7 / Windows 8 / Windows 10.

11 comments
0
Facebook Twitter Google + Pinterest
previous post
Package Management in Nano Server 2016
next post
Production Checkpoint in Hyper-V 2016

Related Reading

Using TSADMIN.msc and TSCONFIG.msc Snap-Ins on Windows Server...

February 2, 2021

Updating the PowerShell Version on Windows

December 24, 2020

Zerologon (CVE-2020-1472): Critical Active Directory Vulnerability

December 4, 2020

How to Run CMD/Program under SYSTEM (LocalSystem) in...

December 3, 2020

Remote Desktop Services Is Currently Busy

October 27, 2020

11 comments

Matteo April 22, 2019 - 2:47 pm

Thanks, this was helpful!

Reply
Aym May 2, 2019 - 9:01 pm

Thanks alot. You saved my a**. I almost exceeded the requested downtime.

Reply
Mohammad June 10, 2019 - 2:03 pm

Million tanx for the solution , it was so helpful.

Reply
Dan Rave June 16, 2019 - 11:25 pm

Hi Sir,
Good Morning. In my case, it is only stuck but not accesible like yours.
Any advise please? thank you so much in advance

Reply
Junior October 6, 2019 - 1:34 pm

Thanks a lot. Works fine!

Reply
kevin October 15, 2019 - 6:39 pm

Mine was just a stuck GUI. Hit Ctrl-Alt-Del and the logon screen was displayed.

Reply
Sushant November 14, 2019 - 3:03 am

Thanks for help my pc stuck at this for an hour

Reply
AAA November 21, 2019 - 9:19 pm

Wow, you totally save my A**.
Thank you so much
AA

Reply
RTY February 27, 2020 - 5:25 pm

Amazing! Whoa, who knew? Thanks so much!

Reply
Dave May 22, 2020 - 4:41 pm

Thanks, worked very well for me!

Reply
Don November 3, 2020 - 2:37 am

Perfect – thank you

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • How to Troubleshoot, Repair and Rebuild the WMI Repository?

    March 2, 2021
  • Accessing USB Flash Drive from VMWare ESXi

    February 26, 2021
  • How to Sign a PowerShell Script (PS1) with a Code Signing Certificate?

    February 25, 2021
  • Change the Default Port Number (TCP/1433) for a MS SQL Server Instance

    February 24, 2021
  • How to Shadow (Remote Control) a User’s RDP session on RDS Windows Server 2016/2019?

    February 22, 2021
  • Configuring PowerShell Script Execution Policy

    February 18, 2021
  • Configuring Proxy Settings on Windows Using Group Policy Preferences

    February 17, 2021
  • Updating Group Policy Settings on Windows Domain Computers

    February 16, 2021
  • Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

    February 11, 2021
  • Packet Monitor (PktMon) – Built-in Packet Sniffer in Windows 10

    February 10, 2021

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Remote Desktop Connection Error: Outdated entry in the DNS cache
  • Windows Update Error 0x80244022 and WsusPool Memory Limit
  • Fixing High Memory Usage by Metafile on Windows Server 2008 R2
  • Unable to Install Print Driver after KB3170455
  • How to Filter Event Logs by Username in Windows 2008 and higher
  • GPO Logging Using Gpsvc.log in Windows 7
  • Why are MSU Windows Updates so Slow to Install?
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top