I've got a custom scheduled task set up in Windows Task Scheduler, but somehow the access control permissions for it have gotten broken. Even though I'm logged in as admin, I can't change the user account the task is running under, or delete the task, or disable it. I am getting "Permission Denied" errors instead.
The machine is running Windows 10 Pro 1803. It is a workgroup machine, not in a domain.
The task is one I created myself (it just launches a PowerShell script twice a day, nothing fancy), so it shouldn't be subject to any anti-tamper mechanisms like the Windows Update-related tasks.
I have tried the following:
- Launch 'Scheduled Tasks' from the Start Menu, by right-clicking and selecting "Run As Administrator". I get
The user account does not have permission to delete this task.
- Delete the task by running the PowerShell command
Unregister-ScheduledTask -TaskName 'My custom task', from an Administrator-level PowerShell prompt. This returns
Access is denied.
- Launching the MMC snap in using
.\psexec -i -d -s mmc taskschd.msc. If I understand correctly, this should be launching the Task Scheduler console snap-in as SYSTEM. I can't delete the task using this, either - I get the same error message as when running using the normal user account, launching the snap-in as Administrator.
Can anyone give me some pointers as to why this might be happening, and how I can fix it?
Where are the task definitions stored? File system, or registry, or elsewhere? It seems like I might need to fix some corrupted security info.