Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

How to start/stop remote services from command line

Thread Tools
 
Search this Thread
 
Old 20 May 2002, 03:21 PM
  #1  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Question

Hi,

I know who to use the NET START/STOP commands for local services, but is there a way to do this for a remote computer?

Stefan
Old 20 May 2002, 03:26 PM
  #2  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

Oh, and it does have to be from the command line.

I have used the DameWare NT utilities in the past, but you need to stop/start things manually.

I need to schedule these from a management PC.

Stefan
Old 20 May 2002, 04:08 PM
  #3  
shunty
Scooby Regular
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

netsvc.exe will do the trick, then schedule in task.
here is my remote exchange service commands, just stick in batch file etc:

NETSVC MSEXCHANGESA \\MACHINENAME /START

WAIT.EXE 20

NETSVC MSEXCHANGEDS \\MACHINENAME /START

WAIT.EXE 15

NETSVC MSEXCHANGEIS \\MACHINENAME /START

WAIT.EXE 15

NETSVC MSEXCHANGEMTA \\MACHINENAME /START

WAIT.EXE 15

NETSVC MSEXCHANGEIMC \\MACHINENAME /START

WAIT.EXE 15

NETSVC MSEXCHANGEINS \\MACHINENAME /START

shunty


[Edited by shunty - 5/20/2002 4:10:30 PM]
Old 20 May 2002, 04:19 PM
  #4  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Thumbs up

Cheers Shunty.

Found another use of the AT command to do it too.

FOR /F %i IN (machines.txt) DO AT \\%i 08:30am CMD "/c NET STOP SERVICE"

This will search the machines.txt file and for every line schedule the command "NET STOP SERVICE".

I'll try and get your util off the IT Manager (he has the resource kit CD's).

Stefan
Old 20 May 2002, 04:19 PM
  #5  
shunty
Scooby Regular
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Smile

found you a good link here that explains.
also sc.exe gets the service name if required

http://www.jsiinc.com/SUBA/tip0400/rh0465.htm

this is a great site for tips etc

shunty
Old 20 May 2002, 04:22 PM
  #6  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Thumbs up

Good man. Consider that site bookmarked

Thanks again,
Stefan
Old 20 May 2002, 04:26 PM
  #7  
mark_h
Scooby Regular
 
mark_h's Avatar
 
Join Date: Mar 2001
Location: Just passing through...
Posts: 17,497
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

Sysinternals have loads of neat tools, one of which is PSTools. That includes a load of useful command-line tools, one of which lets you start/stop services etc.

Trending Topics

Old 20 May 2002, 04:30 PM
  #8  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

Cheers Mark.

I use RegMon and FileMon already; should have known they'd have something for the job.

Stefan
Old 20 May 2002, 08:36 PM
  #9  
shunty
Scooby Regular
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Smile

hey Ozzy, what do ya think of dameware ??
I've been using it for about 2 years & think it is excellent admin software.
not too many people seem to have heard of it.

shunty
Old 20 May 2002, 10:24 PM
  #10  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Thumbs up

Shunty, it's the mutts nuts (as some might say). I've used it to roll-out services, search and replace registry keys, reboot workstations, perform remote commands, etc..

The only thing lacking is some scheduling features, but other than that I think it's superb.

Stefan
Old 21 May 2002, 07:50 AM
  #11  
shunty
Scooby Regular
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

great isn't it Stephan, escpecially in silent mode
I like the way it delivers it's service remotely....also did you know that if you upgrade to the current version & use you current serial number, it works a treat ?
3.51 is the latest I believe.

Going off this subject, mail me offline I have something you might be interested in

shunty
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
Ganz1983
Subaru
5
02 October 2015 09:22 AM
Pro-Line Motorsport
ScoobyNet General
9
28 September 2015 09:48 PM



Quick Reply: How to start/stop remote services from command line



All times are GMT +1. The time now is 11:49 AM.