This is one of those annoying issues that everyone will get at some stage and prevents your computer from shutting down. Leaving it hung up on a stupid little text box that says - Task Host is Stopping background tasks. It's a super vague error message that doesn't give you any idea what to do in order to fix it so follow along as we guide you through all the known solutions for getting rid of it.

Takeaways:

  1. Learn how to fix Task Host is Stopping background tasks.
  2. How do you fix Task Host stopping Windows from shutting down?

How to Fix Task Host Window Preventing Windows 11 Shutdown

Keep it simple! Close any of the background processes and programs that you aren't actually using. There is probably a problematic one that keeps causing the hangup so get rid of it.

  • Press Ctrl + Shift + Esc to open Task Manager.

  • Check the Apps section for open programs.

  • Select each running app and click End Task.

  • Try shutting down the PC again.

End Task Host Process

If Task Host refuses to release control, manually terminating the process may help.

  • Open Task Manager.

  • Navigate to the Details tab and locate Task Host Window.

  • Right-click it and select End Task.

  • Wait for the system to respond, then attempt to shut down again.

Disable Fast Startup

Fast Startup can sometimes leave tasks running, interfering with a smooth shutdown. Disabling it might help.

  • Type Control Panel in Windows Search and press Enter.

  • Select Small icons view, then click Power Options.

  • On the left, select Choose what the power buttons do.

  • Click Change settings that are currently unavailable.

  • Uncheck Turn on fast startup (recommended) and click Save changes.

Run System Maintenance Troubleshooter

This built-in tool detects and fixes issues with background tasks that might be causing Task Host to stall shutdown.

  • Open Control Panel and select Troubleshooting.

  • Click View all on the left panel.

  • Find and select System Maintenance, then follow on-screen instructions.

  • Restart your PC when done.

Update Windows

Let any pending updates finish, sometimes updates that are waiting to finish their install can cause this error.

  • Type Updates in Windows Search and press Enter.

  • Click Check for updates.

  • Install all available updates, including optional ones.

  • Restart your system once updates are installed.

Fix Task Host Window Preventing Windows

Check for Corrupted System Files

Damaged system files may prevent Task Host from closing properly. Running a scan can identify and repair these issues.

  • Type cmd in Windows Search.

  • Right-click Command Prompt and select Run as administrator.

  • Execute the following command:

sfc /scannow

How to Fix Task Host Window Preventing Windows 11 Shutdown

  • Then, run the following commands one by one:

Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth

Fix Task Host Window Preventing Windows 11 Shutdown

  • Restart your computer.

Adjust Registry Settings

Modifying the registry to reduce service timeout can help Task Host terminate more quickly.

  • Press Win + R, type regedit, and press Enter.

  • Navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

  • Locate WaitToKillServiceTimeout, double-click it, and set its value to 5000 (or create it as a new String if not present).

  • Click OK and close Registry Editor.

  • Shut down to confirm resolution.

Boot in Safe Mode

Booting into Safe Mode starts the system with a base Windows set of tools that will allow you to run certain processes without any interference.

  • Open Windows Settings.

  • Select System.

  • Under Recovery options, click Restart now next to Advanced Startup.

  • After restart, select Troubleshoot.

  • Go to Advanced options > Startup Settings > Restart.

  • Press 4/F4 for Safe Mode or 5/F5 for Safe Mode with Networking.

  • Restart your computer normally and check if the issue persists.