Answers

 

Peter S

Senior QA Engineer at Experian Decision Analytics

see all my questions

How to start a Windows service from the command line on remote machine?

Does anyone know if there is a convinient way to start and stop a Windows service on remote machine from the command prompt.
Let's say you are logged on 192.168.0.1 and you are using its command line prompt. How can you start the MySQLService Windows service on 192.168.0.2?
Searching for something like:
C:\> remoteservice start MySQLService 192.168.0.2/username@password
Thanks in advance!

posted July 4, 2008 in Computer Networking | Closed

Share This Question

Share This

Good Answers (1)

 

Matt O

System Engineer SANscreen

see all my answers

Best Answers in: Computer Networking (2), Web Development (1)

This was selected as Best Answer

PStools includes psservice. Pstools is well worth researching if you need to do remote CLI windows mgmt.

Links:

posted July 4, 2008

More Answers (6)

 

Roger D

Desktop Systems Analyst at Atmel Corporation

see all my answers

Best Answers in: Using LinkedIn (46), Computers and Software (4), Ethics (3), Customer Service (1), Travel Tools (1), Compensation and Benefits (1), Personnel Policies (1), Staffing and Recruiting (1), Advertising (1), Customer Relationship Management (1), Planning (1), Market Research and Definition (1), Telecommunications (1), Web Development (1)

I have used SC.EXE in the past for a variety of command-line, service-related tasks. It comes from the Windows Resource Kit and can be downloaded at the link below.

Links:

posted July 4, 2008

 

Craig W

Systems Manager at British Cycling

see all my answers

You not load up an MMC console for services and connect to another computer

Clarification added July 4, 2008:

Sorry, that should have read.
You can load up MMC and choose the services snap-in and connect it to another computer to manage services remotely

posted July 4, 2008

 

Robert Patrick M

Information Technology Specialist for the IL Army National Guard

see all my answers

Here is a Microsoft Technet Article on the Net start command, and it's current uses.

Links:

Clarification added July 4, 2008:

Also, you can remotely manage services through Active Directory.

posted July 4, 2008

 

François A

► President & CEO, IS Decisions (Security Software)

see all my answers

Best Answers in: Internet Marketing (1), Telecommunications (1)

Hi Peter!

You might consider using RemoteExec, a software solution that allows you to instantly and remotely execute programs (.exe, .bat, .cmd), scripts (.vbs, .js), program associated file types (.txt, .doc, .wav, .reg, .inf, .msi, ...), to copy folder(s)/file(s), ...

In your specific case, RemoteExec will remotely execute the following local script "net start MySQLService".

You will just have to provide RemoteExec with the IP address of the target system and appropriate authentication information.

Links:

posted July 4, 2008

 

Jeremy S

Director of Development, Software Applications at ADP Dealer Services

see all my answers

Best Answers in: Staffing and Recruiting (1), Software Development (1)

PSEXEC in PSTools is hands down the solution. I have used this tool for years in production environments for exactly what you are asking. We start/stop services on multiple cluster nodes from a single machine. You can even feed it a list of servers from a text file.

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

posted July 4, 2008

 

Brian F

Owner, Rocky Point Software Inc.; Principal at Macrospect.com

see all my answers

If you are comfortable with the Unix-world way of doing things, you can install (via e.g. Cygwin) and configure an sshd process (secure shell daemon) on your remote machines, and an ssh client on your own desktop machine; then you can subsequently open an ssh session to it ("ssh user@192.168.0.1") and then use the normal Windows command-line service commands, e.g. "net start mysqlservice". Of course, your desktop machine needn't be Windows, as long as you have an ssh client available. Cygwin has both the server and client, but you can also get stand-alone clients for Windows, for instance PuTTY.

Links:

posted July 6, 2008