http://www.perlmonks.org?node_id=1016611


in reply to Remotely Start/Stop Services

This is not exactly a pure Perl route, but here's one way to accomplish the task.

Download PsService or PsExec to the machine that you're running your Perl code on. Then you can do a system call (via exec, system, back ticks, etc.) to call PsService to directly start/stop services on a remote Windows system or call PsExec to remotely run net start or net stop on the remote Windows system.

Both utilities are free and allow you to provide credentials for the remote system. You might want to manually run them once to deal with the EULA pop up that occurs on the first run.

(NOTE: The remote system needs to have Remote Procedure Call service running in order to use PsExec. By default, that service should be running. Not sure if PsService requires that or not.)

May not be a "Perl" solution, but it should get the job done.