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
Fixes (2)
Find what is refusing to close
Windows names applications or waits on them.
Check the shutdown performance events, which name the culprit directly.
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.
Disconnect mapped drives at shutdown if a share is involved.
net useUpdate or remove the named application. A background updater or a sync client is the usual answer.
Reducing the kill timeout is a last resort — it does not fix the cause and can cost unsaved data.
Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control' -Name WaitToKillServiceTimeoutThe 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.
Trace the shutdown properly
Nothing is named and it hangs with a blank screen.
Turn on the verbose status messages so the shutdown says what it is waiting for.
New-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Name VerboseStatus -PropertyType DWord -Value 1 -ForceInstead 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.
Restart and watch which stage it stalls at.
Turn Fast Startup off while diagnosing — it changes what actually happens at shutdown.
powercfg /hibernate offCheck for a driver blocking the power transition.
powercfg /requestspowercfg /energy /duration 60
Remove the verbose setting once diagnosed.
Remove-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Name VerboseStatus
Related faults
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.