none
What the permission for running task remotely?

    Question

  • Hi,

    I need to run a scheduled task on server remotely from a user's computer. Right it works with the account "test" which has the local administrator privilege when I run "schtasks /run /S server /U server\test /P password /I /TN Task" from the user's computer.

    But I do not want the user have the local admin privilege. Either hide the "Test" user name or password to have the user run or give the account "test" none local admin privilege. Either way works for me, but I don't know how to approach it. Need help!

    Thanks in advance! 




    Grace

    Friday, May 4, 2018 12:28 AM

Answers

  • Hi William,

    Thank you for your reply.

    I ran "schtasks /run /S server /U server\test /P password /I /TN Task" and got "Error: Access is denied. "

    User "test" has been granted "Log on as a batch job" user right. 

    If I grant "test" local admin privilege, it will be successful to run the command.

    I checked Event viewer and didn't see any error related to schtasks.

    May I know what detail error message you are looking for and where can I get it?

    Many thanks! 


    Grace

    Hi,

    Please refer to the following article:

    https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks#BKMK_run


    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    William



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, May 16, 2018 2:29 AM

All replies

  • Hi,

    I would apologize for the delayed reply.

    According to my knowledge, to run a scheduled task, user should have “logon as batch job” privilege. We could configure it under Security Settings -- Local Policies -- User Rights Assignment.

    If you have anything unclear, please feel free to let us know.

    Best Regards,

    William


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, May 8, 2018 12:15 PM
  • Hi William,

    Thank you for your reply. I have graned the user "test"  “logon as batch job” privilege, however I still got the "Access Deny" error. Is there other rights the user needs?

    Please advise!

    Many thanks!


    Grace

    Wednesday, May 9, 2018 8:00 PM
  • Hi,

    Would you mind share the detailed error information for us? It would be helpful for us to identity the issue.

    Best Regards,

    William


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, May 11, 2018 3:24 AM
  • Hi William,

    Thank you for your reply.

    I ran "schtasks /run /S server /U server\test /P password /I /TN Task" and got "Error: Access is denied. "

    User "test" has been granted "Log on as a batch job" user right. 

    If I grant "test" local admin privilege, it will be successful to run the command.

    I checked Event viewer and didn't see any error related to schtasks.

    May I know what detail error message you are looking for and where can I get it?

    Many thanks! 


    Grace

    Monday, May 14, 2018 10:28 PM
  • Hi William,

    Thank you for your reply.

    I ran "schtasks /run /S server /U server\test /P password /I /TN Task" and got "Error: Access is denied. "

    User "test" has been granted "Log on as a batch job" user right. 

    If I grant "test" local admin privilege, it will be successful to run the command.

    I checked Event viewer and didn't see any error related to schtasks.

    May I know what detail error message you are looking for and where can I get it?

    Many thanks! 


    Grace

    Hi,

    Please refer to the following article:

    https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks#BKMK_run


    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    William



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, May 16, 2018 2:29 AM
  • Hi William,

    Thank you for your reply. I got it. If the specified user account has to be member of the remote computer administrator group, I wonder if there is a way to hide the password. I do not want the user know the user name and password cause it has administrator privilege.

     Please advise!

    Many thanks! 


    Grace

    Wednesday, May 16, 2018 10:43 PM
  • Hi,

    I would apologize for the delayed reply.

    According to my knowledge, we couldn't.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    William


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Sunday, May 20, 2018 2:29 AM