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.
Microsoft DOSWindows Server 2008Windows Batch

Avatar of undefined
Last Comment
wheelgunr
ASKER CERTIFIED SOLUTION
Avatar of Arana (G.P.)
Arana (G.P.)

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of wheelgunr
wheelgunr
Flag of United States of America image

ASKER

Perfect! Exactly hat I needed! Thank you very much.
Avatar of wheelgunr
wheelgunr
Flag of United States of America image

ASKER

Set in an elevated shortcut to a batch file, the SC command works perfectly.
Windows Server 2008
Windows Server 2008

Windows Server 2008 and Windows Server 2008 R2, based on the Microsoft Vista codebase, is the last 32-bit server operating system released by Microsoft. It has a number of versions, including including Foundation, Standard, Enterprise, Datacenter, Web, HPC Server, Itanium and Storage; new features included server core installation and Hyper-V.

86K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo