Windows · Windows Server  ·  medium  ·  Recovery, imaging & repair

Windows takes minutes to shut down, or hangs on "Restarting"

Something is refusing to close and Windows is waiting out its timeout before killing it.

What you see

"Shutting down" or "Restarting" for several minutes, or a machine that only powers off when the button is held. Event 6008 appears on the next boot.

What is actually wrong

A service that does not respond to the stop request, a network share or mapped drive waiting on a timeout, or a driver blocking the power transition.

Codes and articles

Event 6008Event 203WaitToKillServiceTimeoutShutting downunexpected shutdown

Fixes (2)

Find what is refusing to close
Elevated PowerShell25 minuteslow riskreversible

Windows names applications or waits on them.

  1. Check the shutdown performance events, which name the culprit directly.

    PowerShell
    Get-WinEvent -LogName 'Microsoft-Windows-Diagnostics-Performance/Operational' -MaxEvents 40 -ErrorAction SilentlyContinue |  Where-Object Id -in 203,205,206 | Format-Table TimeCreated,Id,Message -Wrap

    Windows records exactly which service or application took longest to shut down, with a duration in milliseconds. It is the whole answer and nobody looks at it.

  2. Disconnect mapped drives at shutdown if a share is involved.

    Command Prompt
    net use
  3. Update or remove the named application. A background updater or a sync client is the usual answer.

  4. Reducing the kill timeout is a last resort — it does not fix the cause and can cost unsaved data.

    PowerShell
    Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control' -Name WaitToKillServiceTimeout

    The default of 5000ms exists so a database or a sync client can finish writing. Cutting it to 1000ms makes the shutdown look faster and increases the chance of a corrupt file on the way out.

Confirm it workedShutdown completes in a few seconds and no 6008 appears on the next boot.
If you need to undo itRestore WaitToKillServiceTimeout to 5000 if it was changed.
Trace the shutdown properly
Elevated PowerShell45 minuteslow riskreversible

Nothing is named and it hangs with a blank screen.

  1. Turn on the verbose status messages so the shutdown says what it is waiting for.

    PowerShell
    New-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Name VerboseStatus -PropertyType DWord -Value 1 -Force

    Instead of a spinner, the machine names each service as it stops it. The one it sits on for two minutes is the answer, and it takes one restart to find.

  2. Restart and watch which stage it stalls at.

  3. Turn Fast Startup off while diagnosing — it changes what actually happens at shutdown.

    Command Prompt
    powercfg /hibernate off
  4. Check for a driver blocking the power transition.

    Command Prompt
    powercfg /requestspowercfg /energy /duration 60
  5. Remove the verbose setting once diagnosed.

    PowerShell
    Remove-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Name VerboseStatus
Confirm it workedShutdown completes promptly with the cause addressed.
If you need to undo itRemove VerboseStatus and re-enable hibernation with powercfg /hibernate on.

Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.