none
What the permission for running task remotely?

    Domanda

  • 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

    venerdì 4 maggio 2018 00:28

Risposte

  • 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.

    mercoledì 16 maggio 2018 02:29
    Moderatore

Tutte le risposte

  • 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.

    martedì 8 maggio 2018 12:15
    Moderatore
  • 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

    mercoledì 9 maggio 2018 20:00
  • 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.

    venerdì 11 maggio 2018 03:24
    Moderatore
  • 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

    lunedì 14 maggio 2018 22:28
  • 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.

    mercoledì 16 maggio 2018 02:29
    Moderatore
  • 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

    mercoledì 16 maggio 2018 22:43
  • 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.

    domenica 20 maggio 2018 02:29
    Moderatore