Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Remotely Start/Stop Services

by dasgar (Priest)
on Feb 01, 2013 at 21:15 UTC ( #1016611=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016611]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2018-06-22 00:52 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (120 votes). Check out past polls.