~/force reboot of a remote server that has hung shutting down

A remote Windows server hangs on shutdown and RDP is gone. What to try before you get in the car, from PowerShell to the last-resort options.

Updated November 2026. I first wrote this in 2012 about a Windows Server 2008 R2 box. The story still stands, but I’ve added the approach I’d take today.

The problem

I was patching a remote server late one night when it hung while shutting down. I could still ping it and reach its file shares, but RDP was gone. I was facing a long drive the next day just to press a reset button, so I looked for a way to force a reboot remotely first.

What I tried in 2012

Sysinternals PsExec still gave me a command prompt on the server, so I tried a forced restart:

psexec \\SERVER shutdown /r /t 1

or without PsExec:

shutdown /m \\SERVER /r /t 1

Both returned:

1115 A system shutdown is in progress.

Windows thought it was already shutting down, so it wouldn’t accept another restart request. As a last resort I used PsKill to end winlogon on the server:

pskill \\SERVER winlogon

A few minutes later the server restarted. When I logged back in over RDP, I got “Please wait for the Windows Modules Installer”, then “Configuring updates”, then another restart. After the second round it came back cleanly, and the event logs and Windows Update history showed everything had installed.

What I’d do today

Work through these in order, from least to most drastic.

1. Try a normal forced restart with PowerShell

Restart-Computer -ComputerName SERVER -Force

If you get the “shutdown is in progress” error, move on.

2. Find out what’s actually stuck

A hang during patching is usually the Windows Modules Installer service (TrustedInstaller) still working, or a third-party service that won’t stop. Check before killing anything:

sc \\SERVER queryex TrustedInstaller
tasklist /s SERVER /svc

If TrustedInstaller is busy, it’s often genuinely installing updates. Give it time: 20–30 minutes is not unusual on a slow server. Interrupting it is what causes broken updates.

3. Stop the specific hung process

If one service is clearly the culprit (not TrustedInstaller mid-install), end just that process using the PID from the commands above:

taskkill /s SERVER /pid 1234 /f

4. Use out-of-band management

This is the real answer today, and the one I wish I’d had in 2012:

  • Physical servers: the iDRAC, iLO or IPMI interface gives you a console and a power-cycle button from anywhere.
  • Virtual machines: reset it from Hyper-V Manager, vCenter or the Azure portal (which also has a Serial Console).

5. Last resort: end winlogon

Ending a core system process like winlogon forces an abrupt restart, much like pulling the plug. It worked for me, but it can corrupt a half-installed update. Only do it if the alternative really is a long journey to press the power button.

In short

Check what’s stuck before you force anything, and set up out-of-band management on any server you can’t easily get to. It turns a long drive into a two-minute fix.