Solved

Start Stop Service via Script

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now