Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping a Service on another machine 1

Status
Not open for further replies.

lvennard

MIS
Apr 20, 2000
93
US
stopping a service is easy.
net stop "microsoft dhcp server"

but if i need to do it on another machine... that seems tough.
i've tried net stop "\\machine2\microsoft dhcp server".
and, well, no. thats why im here.

looked at technet and searched for "stopping a service on another machine". kinda lost now, can anyone help?

 
Use server manager, select the other server and do FILE Services.
 
I use Hyena or DameWare or ipMonitor to start and stop services now, but without these 3rd party tools, I'd be using Server Manager too.
 
sorry bout this, i should have specified.
im running a batch file to run a small backup procedure.
no gui.
command line only.... um or could you use server manager using the command line?
ive already tried for options on srvmgr.exe /? with nothing.


should i give up?

 
You need to use NETSVC from the NT 4.0 Resource Kit.

Here's an explanation from
NETSVC

Controls and displays the status of services.

NETSVC servicename \\computername /command

servicename Name of the service
computername Name of the computer to administer.
/command One of the following:
/query Queries the status of the service.
/start Starts the service.
/stop Stops the service.
/pause Pauses the service.
/continue Starts the paused service.
/list Lists installed services (omit servicename)

Example: NETSVC server \\joes486 /query
Example: NETSVC "Clipbook Server" \\popcorn /stop
Example: NETSVC alerter \\joes486 /pause
Example: NETSVC /list \\joes486

Arguments are allowed in any order.
 
NT Resource Kit has just the command: NETSVC.EXE

Syntax:

netsvc servicename \\computername switch

where

servivename is the service name in the Regisrty, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

computername is the remote machine whose services you want to act upon

switch can be one of the following
/query
/start
/stop
/continue
/list
/pause

 
You could always use thr rcmd command e.g rcmd \\servername then at the next prompt use net start servicename or net stop servicename
 
You could always use the rcmd command e.g rcmd \\servername then at the next prompt use net start servicename or net stop servicename
 
thanx everyone, got the resource kit and all is well now..
your my heros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top