Solved

Start Stop Service via Script

Posted on 2013-11-03
2
738 Views
Last Modified: 2013-11-13
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
Comment
Question by:Cobra25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
Smighty earned 500 total points
ID: 39620319
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
 
LVL 8

Expert Comment

by:Amitabh Singh
ID: 39636920
ok
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question