Solved

Start Stop Service via Script

Posted on 2013-11-03
2
736 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

856 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