Dave Bouwman had a post on using the “NET” command for service administration. Hats off to Dave, but PsService fits much better into my workflow.
Check out http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/PsService.mspx
Now check out the code below, half stolen, half rewritten:
@echo off
echo **************************************
echo Stopping IMS Services
echo **************************************
psservice \\10.147.156.69 STOP “ArcIMS Tasker 9.2.0″
psservice \\10.147.156.69 STOP “ArcIMS Monitor 9.2.0″
psservice \\10.147.156.69 STOP “ArcIMS Application Server 9.2.0″
pause
cls
echo ***************************
echo Restarting IMS Services
echo ***************************
psservice \\10.147.156.69 start “ArcIMS Application Server 9.2.0″
psservice \\10.147.156.69 start “ArcIMS Monitor 9.2.0″
psservice \\10.147.156.69 start “ArcIMS Tasker 9.2.0″
pause