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.