?
Solved

Start/stop services on server from another pc.

Posted on 2004-09-01
2
Medium Priority
?
229 Views
Last Modified: 2010-04-11
Hi.

I'm lazy.

I'm REALLY lazy.

I want to stop/start (i.e. restart) services on different servers without having to load up VNC, Computer Management, RDP, etc.

I want a nice simple command line which will do this.

Why on earth does NET NOT support \\server I've no idea.

In truth it is only ever going to be Restart Fax Server and Restart Print Services on 2 different servers.

I have access to the server (physically and logically).

I've tried using SOON but never seem to get it to work.

Any ideas?

Richard.
0
Comment
Question by:Richard Quadling
[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:
HackLife earned 500 total points
ID: 11949890
What you need is right here: http://www.experts-exchange.com/Operating_Systems/WinNT/Q_20896218.html

I'd like to paraphrase PeteLong:

Sc.exe is a tool that provides a way to communicate with the Service Control Manager to retrieve/manage information about services.
Netsvc.exe is a tool to remotely start, stop, and query the status of services from the command line.

You can use these tools to configure the Startup of a service and to remotely Start and Stop a service while registering the change with the Services Control Manager, as long as you have Admin priviledges on both machines.

The following example will configure the Schedule service on \\NTWORK1 to start Automatically, start it, check it's configuration and status:

sc \\NTWORK1 config Schedule start= auto
[SC] ChangeServiceConfig SUCCESS
netsvc /start \\NTWORK1 "Schedule"
Service is pending start on \\NTWORK1
sc \\NTWORK1 qc Schedule
[SC] GetServiceConfig SUCCESS
SERVICE_NAME: Schedule
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\WINNT\System32\AtSvc.Exe
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : Schedule
DEPENDENCIES :
SERVICE_START_NAME : LocalSystem
netsvc /query \\NTWORK1 "Schedule"
Service is running on \\NTWORK1
http://www.jsiinc.com/SUBA/tip0400/rh0465.htm
0
 
LVL 40

Author Comment

by:Richard Quadling
ID: 11950002
Thanks.
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This program is used to assist in finding and resolving common problems with wireless connections.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

764 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