Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Start/stop services on server from another pc.

Posted on 2004-09-01
2
Medium Priority
?
231 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

604 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