[BAT] Remotely invokes a scheduled task on Windows Server via Schtasks.exe, prompting Error:access is denied

Source: Internet
Author: User
Tags domain server schtasks

A scheduled task was built on Windows Server and wanted to pass the command

Schtasks/run/tn "Ipadforadvisor_qa_apitest"/s szpcwin2k801/u msdomain1\jzhang6/p jzhang6 ' Spassword

To remotely launch this scheduled task, always prompt error:access is denied

The login username and password are in the szpcwin2k801 Administrators Group, and are in the same domain.

If I had built this project on a win 7 machine, I could have done it.

After a round of Google searches, various methods have been tried, including:

Method 1:add the right-to-log on as a batch job. e.g.: Go to administrative tool > Local Security Policy > Local Policies > User Rights Assignment > Logon as a batch job > Add.

Method 2:i gave the user Read+execute (and even full Control) to the C:\windows\tasks folder on the server.

But only one method worked:

This is described on the Internet:

According to the help text, the user must is a member of the local Administrators group, the local Backup Operators group,
The domain Server Operators group, or has been delegated the appropriate authority, on the local computer.

I did one thing: Add the user to this group "the local Backup Operators group", the problem is solved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.