Stopping and starting services using a scheduled task fails

I can manually run C:\WINDOWS\system32\netdotexe Stop (or Start) "Service Name" and services stop/start as they should.
I have scheduled these commands to stop/start using the windows task scheduler and I tried testing the schedules by doing a right click and run.
They both fail to stop/start the services.
I have made sure I specified admin password when setting up the tasks.
Please advise on possible reason for tasks failing to run as scheduled tasks.
stevenvelIT ConsultantAsked:
Who is Participating?
Jaroslav MrazCTOCommented:
you must do it from BATCH script .bat

Use the Task Scheduler to schedule this batch file:
@echo off
net start "Some Service"
net stop "Some Service"

and run of bat script get in sheduler this works for everything shedlued for me :)
stevenvelIT ConsultantAuthor Commented:
Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.