Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 752
  • Last Modified:

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?
0
Cobra25
Asked:
Cobra25
1 Solution
 
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.

Join & Write a Comment

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now