Share via

Task Scheduler is completing with a return code 2147942401 after the latest Windows server updates for Server 2022

Richard Kichman 0 Reputation points
2026-03-19T15:15:22.58+00:00

Task Scheduler is completing with a return code 2147942401 after the latest Windows server updates for Server 2022

Windows for business | Windows Server | Performance | Application technologies and compatibility
0 comments No comments

3 answers

Sort by: Most helpful
  1. Jason Nguyen Tran 14,595 Reputation points Independent Advisor
    2026-03-25T03:19:50.1166667+00:00

    Hi Richard Kichman,

    I’m following up to check whether the issue has been resolved. Feel free to reply if you need further information. If the information provided was helpful, please click "Accept Answer" to help others in the community. Thank you!

    0 comments No comments

  2. Jason Nguyen Tran 14,595 Reputation points Independent Advisor
    2026-03-19T16:03:30.4266667+00:00

    Hi Richard Kichman,

    The return code 2147942401 translates to “Access Denied,” which usually means the task is running under an account or with permissions that no longer align correctly after the latest patch.

    A few steps you can try:

    Re‑enter the credentials for the account running the task, and ensure “Run with highest privileges” is checked.

    Verify that the account has Log on as a batch job rights in Local Security Policy.

    If the task references scripts or executables, confirm that the file paths are still valid and accessible.

    Check whether the update reset or tightened permissions on folders or registry keys the task depends on.

    Review the Event Viewer logs around the time the task runs for more specific clues.

    If the issue persists, you may want to recreate the task from scratch with the same settings, as this often clears hidden corruption introduced by updates.

    In short, this error is almost always tied to permissions or credentials, and re‑validating those should get your tasks running again. I hope the response provided some helpful insight. If it clarified the issue for you, please consider marking it as Accept Answer so others with the same issue can find the solution.

    Jason.

    0 comments No comments

  3. Q&A Assist
    2026-03-19T15:15:44.6066667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Return code 2147942401 from Task Scheduler corresponds to an “Access is denied” (0x80070005) error. After installing the latest Windows Server 2022 updates, scheduled tasks that previously worked can start failing with this code if permissions, elevation, or policy requirements are not met.

    To resolve this, use the following checks and fixes:

    1. Run Task Scheduler elevated
      • Right-click Task Scheduler and select Run as administrator.
      • Re-run the task manually and confirm whether it still returns 2147942401.
    2. Verify the account and its permissions
      • In Task Scheduler, right-click the failing task → PropertiesGeneral.
      • Confirm When running the task, use the following user account is set to an account that:
        • Still exists and is not disabled.
        • Has local permissions to run the program/script and access any required files/paths.
      • If the task must perform admin-level actions, ensure the account is in the Administrators group or otherwise has the required rights.
    3. Enable “Run with highest privileges”
      • In the same General tab, select Run with highest privileges.
      • This ensures the task runs elevated, which is often required after security-hardening updates.
    4. Check “Log on as a batch job” right (Group Policy)
      • Open gpedit.msc.
      • Go to Computer ConfigurationWindows SettingsSecurity SettingsLocal PoliciesUser Rights Assignment.
      • Open Log on as a batch job and verify the task’s run-as account is listed (or included via a group that is listed).
      • If not, add it, apply the policy, and then retry the task.
    5. Re-register the task if it may be corrupted
      • Export the task, delete it, and re-import it to refresh its registration:
      • From an elevated PowerShell prompt:
             Export-ScheduledTask -TaskName "<task_name>" -FilePath "C:\Temp\<task_name>.xml"
        
      • Delete the task in Task Scheduler.
      • After any file/registry corrections, re-register it:
             Register-ScheduledTask -Xml (Get-Content "C:\Temp\<task_name>.xml" | Out-String) -TaskName "<task_name>"
        
    6. Use History and Last Run Result for further detail
      • In Task Scheduler, select the task and check:
        • Last Run Result (should show 0x0 when successful).
        • History tab for any additional error events that indicate which resource or action is being denied.

    If the task still fails with 2147942401 after these steps, focus on what the task actually runs (script, EXE, or command) and test that command directly in an elevated PowerShell or Command Prompt under the same account to see where access is denied.


    References:

    0 comments No comments

Your answer

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