This issue of Windows getting stuck at the "Getting Windows Ready. Don’t turn off your computer" message is fairly common, especially on Windows Server versions (2022, 2019, 2016) and occasionally on Windows 10 and 11. This often occurs after installing updates or modifying system roles and features.
When encountering this message, the best initial advice is to remain patient. It can be normal for the installation process to take an extended period, particularly if updates haven’t been installed in a while, or if the system performance is sluggish. However, it’s possible for the system to freeze indefinitely during this phase.
If you find yourself needing to shut down or restart your system under these conditions, you may have to forcefully interrupt the process, although this carries the risk of corrupting the Windows image.
To manage this situation more gracefully, you can attempt to terminate background processes that may be causing the freeze. During this update installation phase, while direct desktop access via Remote Desktop Protocol (RDP) is not possible, you can connect to the affected computer remotely using administrative tools, provided it’s in the same local network (LAN).
First, ensure that you can access the troubled computer over the network and verify the accessibility of the SMB port (445). You can use the following command:
Test-NetConnection 192.168.123.10 -port 445
Next, open the Services snap-in (services.msc
) and connect to the problematic host by going to Action > Connect to another computer, and inputting the required details.
Look for the Windows Modules Installer, which often gets stuck in a "Stopping" state and can prevent proper system shutdown or reboot. If you’re unable to manage this service via the GUI, you can utilize the command prompt on a different Windows machine to access the affected system using a tool like PsExec. The command would resemble the following:
PsExec.exe \192.168.13.10 -i -u localadminname powershell.exe
With a remote PowerShell session open, you can check for processes consuming high resources, particularly TiWorker.exe
, which is associated with update tasks. Use these commands to list processes by memory and CPU usage:
Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 10 Name, Id, @{Name="Memory (MB)"; Expression={[math]::round($_.WorkingSet / 1MB, 2)}}
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, Id, @{Name="CPU Time (s)"; Expression={[math]::round($_.CPU, 2)}}
If TiWorker
is indicating high resource usage, check how long it’s been running:
Get-Process TiWorker | Select-Object Id, Name, CPU, WorkingSet, StartTime
To find services stuck in a "Stopping" state:
Get-CimInstance -Class win32_service | where-Object state -eq 'stop pending'
To terminate the TrustedInstaller service and any hung processes, use:
taskkill /IM TrustedInstaller.exe /F
If the command must be executed remotely and include user credentials, the command would look like:
taskkill.exe /s 192.168.13.10 /u woshubadmin_account /p MyPassw0rd! /im TrustedInstaller.exe
After executing these commands, the system should ideally move to the "Shutting down" state and reboot successfully.
While forcibly terminating the TrustedInstaller service isn’t recommended under normal circumstances, sometimes it may be necessary if the system is stuck for an excessive duration. Once back online, it’s essential to check the integrity of the operating system image and repair any issues using DISM and the sfc /scannow
command, especially if Windows fails to boot after the update process.