1

My issue exists in another question here. I'm wondering whether it's possible to activate a scheduled task on one server from the command line of another server. I do not want to use psexec as it is known to be an enabled of malware and viruses. Does anyone know if this is possible?

Community
  • 1
  • 1
Vincent Vance
  • 117
  • 1
  • 4
  • 13

1 Answers1

5

You can use the the commands below to stop and start tasks remotely.

Stop:

schtasks /end /s <machine name> /U Username /P password /tn <task name>

Start:

schtasks /run /s <machine name> /U Username /P password /tn <task name>
Badradish
  • 196
  • 1
  • 13
  • Awesome. This worked. I also utilize the information here to have the batch wait for the scheduled task to complete: http://stackoverflow.com/questions/20261639/how-do-you-wait-on-a-task-scheduler-task-to-finish-in-a-batch-file-or-c – Vincent Vance Jul 23 '14 at 21:15