Link to home
Start Free TrialLog in
Avatar of wheelgunr
wheelgunrFlag for United States of America

asked on

Remote start and stop of service

I have a need for my backup server to stop  and  then restart a remote server's service to improve throughput. I have the following PSTools command string:

psexec \\xxx.xxx.xxx.xxx -u domain\username-p Password -w C:\services cmd  svcstop.bat (opposite is svcstart.bat.)

Everything seems to go well, but this stops at the remote folder C:\services, and then just sit there.

Cam anyone recommend a fix for this, or suggest a better way? The target server is a 2008 R2n and the BU server is a 2008 R2 Enterprise.

Thanks in advance for any input and help.
ASKER CERTIFIED SOLUTION
Avatar of Arana (G.P.)
Arana (G.P.)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wheelgunr

ASKER

Perfect! Exactly hat I needed! Thank you very much.
Set in an elevated shortcut to a batch file, the SC command works perfectly.