wheelgunr
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Set in an elevated shortcut to a batch file, the SC command works perfectly.
ASKER