|
| 1 | +--- |
| 2 | +title: Resolve Task Scheduler Access Denied Error |
| 3 | +description: Introduce how to resolve the Access Denied error that occurs when you use Task Scheduler. |
| 4 | +ms.date: 03/19/2025 |
| 5 | +manager: dcscontentpm |
| 6 | +audience: itpro |
| 7 | +ms.topic: troubleshooting |
| 8 | +ms.reviewer: ormaldon, warrenw, 5x5UEX |
| 9 | +ms.custom: |
| 10 | +- sap:system management components\Task Scheduler |
| 11 | +- pcy:WinComm User Experience |
| 12 | +--- |
| 13 | +# "Access Denied" error when using Task Scheduler |
| 14 | + |
| 15 | +When using Task Scheduler, you receive the following error message: |
| 16 | + |
| 17 | +> Access is denied. The user account does not have the permissions to run this task. |
| 18 | +
|
| 19 | +## Cause |
| 20 | + |
| 21 | +The issue occurs due to one of the following reasons: |
| 22 | + |
| 23 | +- The user account that you used to run the task doesn't have the necessary administrative privileges. |
| 24 | +- The permissions for the **C:\\Windows\\System32\\Tasks** folder were changed. |
| 25 | +- The task is configured to run with a specific set of credentials that differ from your current user account. |
| 26 | + |
| 27 | +> [!NOTE] |
| 28 | +> If you connect to a remote host using **mmc.exe** with the Task Scheduler snap-in or **taskschd.msc** console using a regular account, it's expected to receive an access denied error. Only accounts that are part of the Local Administrators group or Domain Administrators group are allowed to remotely manage a system. For security reasons, a non-administrator user can't view or manage a Windows Task Scheduler task created by another user. For more information, see [What's New in Task Scheduler](/windows/win32/taskschd/what-s-new-in-task-scheduler#windows-10-and-windows-server-2016). |
| 29 | +
|
| 30 | +## Resolution |
| 31 | + |
| 32 | +To resolve this issue, use one of the following methods. |
| 33 | + |
| 34 | +### Run Task Scheduler as administrator |
| 35 | + |
| 36 | +Right-click **Task Scheduler** and select **Run as administrator**. This approach can often resolve access issues. |
| 37 | + |
| 38 | +### Check user account permissions |
| 39 | + |
| 40 | +Ensure that the user account you're using has the necessary permissions to run the task. You might need to add your user account to the Administrators group. |
| 41 | + |
| 42 | +### Modify task properties |
| 43 | + |
| 44 | +1. Open **Task Scheduler**, find the task causing the issue, right-click it, and select **Properties**. |
| 45 | +2. Go to the **General** tab and select **Run with highest privileges**. |
| 46 | + |
| 47 | +### Check Group Policy settings |
| 48 | + |
| 49 | + 1. Open the Group Policy Editor by typing **gpedit.msc** in the **Run** box. |
| 50 | + 2. Navigate to **Computer Configuration** > **Windows Settings** > **Security Settings** > **Local Policies** > **User Rights Assignment**. |
| 51 | + 3. Ensure that your user account has the **Log on as a batch job** right. |
| 52 | + |
| 53 | +### Manual task reinitialization |
| 54 | + |
| 55 | + 1. Export the problematic task to an XML file before deleting it. To do so, run the following command: |
| 56 | + |
| 57 | + ```powershell |
| 58 | + Export-ScheduledTask -TaskName "<task_name>" -FilePath "<backup_xml_file_path>" |
| 59 | + ``` |
| 60 | +
|
| 61 | + 2. Reimport the task after registry/file corrections: |
| 62 | +
|
| 63 | + ```powershell |
| 64 | + Register-ScheduledTask -Xml (Get-Content "<backup_xml_file_path>" | Out-String) -TaskName "<task_name>" |
| 65 | + ``` |
0 commit comments