Task Host is preventing shut down

Jan Byrne 20 Reputation points
2025-05-25T07:44:39.05+00:00

I keep getting the Task Host is preventing shut down

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,901 questions
{count} votes

Accepted answer
  1. Henry Mai 1,190 Reputation points
    2025-05-26T13:18:53.5666667+00:00
    • Hi, I'm Henry! I will help you with this.
    • Here's a list of troubleshooting steps you can try:
    1. Check for Windows Updates: Sometimes this issue is a bug that Microsoft has since patched.
    • Go to Settings > Windows Update.
    • Click Check for updates and install any pending updates, including optional ones (which can sometimes contain driver fixes). Restart your PC after.
    1. Run the Power Troubleshooter:
    • Go to Settings > System > Troubleshoot > Other troubleshooters.
    • Find Power and click Run. Follow the on-screen instructions.
    1. Disable Fast Startup: Fast Startup can sometimes cause shutdown and startup issues.
    • Search for "Control Panel" in the Start Menu and open it.
    • Go to Hardware and Sound > Power Options.
    • Click Choose what the power buttons do on the left side.
    • Click Change settings that are currently unavailable (you might need administrator privileges).
    • Uncheck the box for Turn on fast startup (recommended).
    • Click Save changes and restart your computer. Then try shutting down normally.
    1. System File Checker (SFC) and DISM: Corrupted system files can cause various issues, including this one.
    • Search for "cmd" in the Start Menu, right-click Command Prompt, and select Run as administrator.
    • Type sfc /scannow and press Enter. Wait for it to complete.
    • If it finds and fixes issues, restart and test. If not, or if issues persist, run DISM:
    • In the same Command Prompt, type: DISM /Online /Cleanup-Image /ScanHealth (press Enter, wait) DISM /Online /Cleanup-Image /CheckHealth (press Enter, wait) DISM /Online /Cleanup-Image /RestoreHealth (press Enter, wait)
    • Restart your PC and see if the shutdown issue is resolved.
    1. Identify Problematic Background Tasks (Using Event Viewer): This is a bit more advanced, but can sometimes pinpoint the culprit.
    • Before you shut down, note the time.
    • If the "Task Host" message appears, force shutdown.
    • After restarting, open Event Viewer (search for it in the Start Menu).
    • Navigate to Windows Logs > Application and also Windows Logs > System.
    • Look for Error or Warning events around the time you attempted the shutdown. Specifically, look for events related to TaskHostW.exe or any applications that might have timed out or failed to close.
    • Also check Applications and Services Logs > Microsoft > Windows > TaskScheduler > Operational. Look for tasks that might have been running or failed around shutdown time. This might give a clue about a specific scheduled task causing the hold-up.
    1. Perform a Clean Boot: This helps determine if a third-party application or service is causing the problem.
    • Search for msconfig and open System Configuration.
    • Go to the Services tab.
    • Check the box Hide all Microsoft services.
    • Click Disable all.
    • Go to the Startup tab and click Open Task Manager.
    • In Task Manager, disable all startup items (right-click > Disable).
    • Close Task Manager, click OK in System Configuration, and restart your PC.
    • Try shutting down. If it shuts down normally, then one of the disabled services or startup items was the cause. You'll then need to re-enable them a few at a time to isolate the problematic one. (Remember to re-enable Microsoft services you might want after testing, or just re-enable all and then selectively disable third-party ones).
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.