PDA

View Full Version : Start/Stopping a Windows Service on a remote computer??



sgerbitz
02-15-2008, 08:46 AM
Can someone help me start/stop a windows service on a remote computer (connected to the network), thru dos?

I know how to do it on a same computer, just sure how to do it on a remote computer.

Example:

net start spooler

SgtM
02-15-2008, 08:37 PM
You can also do it through the computer manager. Right click on my computer, click manage. At the top, you'll see computer manager (local). Right click, and then select connect to another computer. On the next window that comes up, type in the machine name, and you're all set.

sgerbitz
02-15-2008, 08:40 PM
I wanted to do it via command prompt so i could script it out in a batch file! I have several computers in the house that a certain service keeps dieing and restarting it fixes it!

mtekk
02-15-2008, 09:31 PM
You could just run a batch script on each computer that will cause the application/service to be restarted periodically. Otherwise you'll need SSH for command scripting, but then you might as well run a UNIX like OS on those computers.

SgtM
02-16-2008, 11:49 AM
net computername servicename start/stop/restart

mtekk
02-16-2008, 12:21 PM
net computername servicename start/stop/restart

Shouldn't there be some authentication that needs to be done before running that? Otherwise that is sort of a gaping security hole? Looks like you may need to disable the windows firewall on the clients you'll be sending that command to.

SgtM
02-17-2008, 01:06 AM
No authentication needed. Nothing needs to be disabled on the firewall before running it either. Basically, if you're on the same domain or workgroup, you can run that command. Domains are a little more secure because of the ability to use GPO (http://technet.microsoft.com/en-us/windowsserver/grouppolicy/default.aspx).

OvRiDe
02-17-2008, 02:21 AM
Sometimes you still might run into authentication problems. I have found the PSTools suite from Sysinternals invaluable.

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

Psservice and PsExec should help you on your way

Hope this helps!