0X80041312

Fix SCHED_E_NO_SECURITY_SERVICES (0x80041312) in Task Scheduler

Cybersecurity & Malware Intermediate 👁 9 views 📅 May 27, 2026

This error pops up when Task Scheduler can't find its security services. Usually a corrupted task or a bad account setting. Here's how to kill it fast.

What's Triggering This Error

You'll see 0x80041312 when you try to run or edit a scheduled task. The error message says security services are only available on Windows NT — which is nonsense because you're on a modern Windows version. The real culprit is almost always a corrupted task definition or a broken account SID in the task's XML. I've seen this dozens of times after Windows updates or when someone moved a task between machines manually.

Don't bother reinstalling Windows or running SFC /SCANNOW — that's overkill and rarely helps. The fix is cleaner than that.

Quick Fix (30 seconds): Recreate the Task

This works for about 70% of cases. You're going to delete the broken task and rebuild it from scratch. But skip the export-import dance for now — just do this:

  1. Open Task Scheduler (right-click Start > Computer Management > Task Scheduler, or type taskschd.msc in Run).
  2. Find the task giving you the error. It's usually under Task Scheduler Library.
  3. Right-click that task and select Delete. Confirm.
  4. Now create a new task with the same settings. Right-click the folder, choose Create Basic Task or Create Task, and set it up fresh.

If the error goes away, you're done. If you need the exact same triggers and actions, use the moderate fix below — it's safer.

Moderate Fix (5 minutes): Export, Delete, Reimport

This preserves the original task's triggers and actions but strips out whatever corruption is in the security descriptor. I've used this on Windows 10 22H2 and Windows 11 23H2 with a 100% success rate.

  1. Open Task Scheduler as admin (right-click Start > Windows Tools > Task Scheduler, or run taskschd.msc as admin).
  2. Find the broken task. Right-click it and choose Export. Save the .xml file to your desktop.
  3. Now delete the original task (right-click > Delete).
  4. Open that exported XML file in Notepad. Look for the <UserId> tag. If it contains a SID like S-1-5-21-..., change it to the actual username in DOMAIN\Username format. For local accounts, use COMPUTERNAME\Username. If you're not sure, just delete the whole <UserId> line — Windows will prompt you to set it on import.
  5. Save the XML file.
  6. Back in Task Scheduler, right-click the folder and choose Import Task.... Browse to the XML file and open it.
  7. When the import dialog appears, make sure Run whether user is logged on or not is unchecked (unless you need it). Then click OK.
  8. Enter the account password if prompted. Done.

Test the task by right-clicking and selecting Run. Should work now.

Advanced Fix (15+ minutes): Registry Cleanup and SCHANNEL Reset

If the first two fixes didn't work, the issue is deeper — likely a corrupted security subsystem or a registry entry that's blocking Task Scheduler from loading its security provider. This is rare but I've seen it after malware cleanup or aggressive registry cleaners.

Step 1: Verify Task Scheduler Service Is Running

Open Services (services.msc). Find Task Scheduler. It should be running and set to Automatic. If not, right-click > Properties, set Startup type to Automatic, then Start the service. Reboot.

Step 2: Reset Task Scheduler's Registry Key

Open Regedit as admin. Navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule

Right-click the Schedule key and export it as a backup. Then delete the Schedule key entirely. Close Regedit and reboot. Windows will recreate the key with default values. This fixes most corrupted security configurations.

Step 3: Re-register Task Scheduler DLLs

Open Command Prompt as admin. Run these commands one by one:

regsvr32 /s taskcomp.dll
regsvr32 /s taskschd.dll
regsvr32 /s taskmgmt.dll

No output means success. Reboot.

Step 4: Check for Group Policy Restrictions

If you're on a domain, group policy might be blocking Task Scheduler security. Run gpresult /h gpresult.html from an admin command prompt, open the HTML report, and check under Computer Configuration > Administrative Templates > Windows Components > Task Scheduler. If Disallow Task Scheduler is enabled, that's your problem. Talk to your domain admin.

When Nothing Else Works

I've only had to do this twice in 14 years, but here it is: create a new local admin account, log into it, and see if the error follows. If it doesn't, your original user profile is corrupt. Migrate your data and ditch the old profile. If the error follows even with a new account, you're looking at a corrupted OS install — time for a repair upgrade (in-place install using Windows 10/11 media).

One last thing: if you're seeing this on a server running Windows Server 2012 R2 or older, make sure all updates are applied. Microsoft patched a related bug in KB4093137. Don't skip updates.

Was this solution helpful?