Starting/Stopping a service on a remote server
I am looking for a method of starting/stopping a service on a remote Windows 2003 Server. Locally I know that the net command works, but is there a way to do this over the network?
EDIT: Looking to be able to do this in a script, external GUI tools won't work unless they have a command line tool.
Use the "sc.exe" command from the Windows Server Resource Kit.
An example, to configure a the IIS service to Autostart and then to start it:
sc \\server1 config w3svc start= auto
sc \\server1 start w3svc
There is a free sysinternals tools called PsService that allows you to view status, start, stop services locally and on other machines.
Use the sc command:
sc [server] [command] [service name]