Friday, October 31, 2008

Remote Windows Service control

The command line way of controlling windows services is to use the net start and net stop commands. This will not work for remote servers though.

Instead we use the sc command. If I want to stop a service on GR0409A1, write:

sc \\gr0409a1 stop "Sonic CT_H1_ARN_StartGR0409A1 Service (AtlasProd)"


Also we can configure services with the sc command. To configure a service to autostart:

sc config "Sonic CT_H1_ACN_StartAtlasFileTransfer Service (LocalTest)" start= auto


This will work at least on XP.

No comments: