Can I (How can I) remotely start and stop a Windows Service running on another server from the command line?
My server is running Windows Server 2003.
Can I (How can I) remotely start and stop a Windows Service running on another server from the command line?
My server is running Windows Server 2003.
Sure thing. Provided you're logged-on with an account that has "Administrator" rights on the remote server, just do:
sc \\remote-server stop service-name
and
sc \\remote-server start service-name
The sc
command runs asynchronously to the service control manager, so you may want to query the service with the command below to insure it actually stopped before you try to start it again:
sc \\remote-server query service-name