Allow domain users to start a scheduled task on a server

This may prove to be useful in cases where a user, or group, may need to run a script on a remote computer that requires admin privileges. Therefore, limiting the need for added permissions.

Create a new task on the machine that will run it.

Make sure that this task will be able to run whether the user is logged on or not.

Next, we need to make sure that the Windows directory that holds all your tasks has the right permissions for the group or user you want to all to start it.

Navigate to your Windows directory, right-click and select proprieties on the Tasks folder. Go to the Security tab, click Edit and add the group or user that you want to allow to remotely start your task.

Click OK and give them Full control.

After that, write a batch file to remotely start this task.

Replace the TaskName with your task name and the ComputerName to the remote computer’s name that has your scheduled task.

powershell.exe -command Set-ExecutionPolicy RemoteSigned -Force
powershell.exe -command "invoke-command {schtasks /run /tn 'TaskName'} -computer ComputerName"

Finally, Deploy the batch file over to the user or group that you’ve added to the Permissions for Tasks.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.