Skip to content

Commit 03daa79

Browse files
authored
Merge pull request #8454 from Deland-Han/ci4341
AB#4341: New web article on The user account does not have permission to run this task
2 parents 883a8ce + 6cf2c8d commit 03daa79

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
```

support/windows-server/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,6 +2569,8 @@ items:
25692569
href: ./system-management-components/scheduled-tasks-reference-incorrect-user-profile.md
25702570
- name: Troubleshoot issues with scheduled tasks not running
25712571
href: ./system-management-components/troubleshoot-scheduled-tasks-not-running.md
2572+
- name: Resolve Task Scheduler "Access Denied" error
2573+
href: ./system-management-components/troubleshooting-task-scheduler-access-denied-error.md
25722574
- name: WinRM
25732575
items:
25742576
- name: Error 0x80090322 when connecting PowerShell to remote server via WinRM

0 commit comments

Comments
 (0)