Start Stop Service via Script

I have about 50 servers that I need to remotely start and stop the windows time service on.

I would like to run this via script (fastest way)

Can someone help me with this?
LVL 4
Cobra25Asked:
Who is Participating?
 
SmightyCommented:
the actual command would be "net stop time" and "net start time" respectively. You could use them in a Loop for your servers
Another - much neater - way of doing that is with powershell.

Here's a way for powershell:
http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_27298557.html

and here a more sophisticated way:
http://www.blogmynog.com/2010/06/22/powershell-script-to-restart-service-and-dependents/
0
 
Amitabh SinghAWS Certified Solution Architect | L3 IT Specialist for CloudCommented:
ok
0
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.