You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ServiceControllerHelpers module contains functions for administering Windows services, such as startService, stopService, etc. Currently, these functions can only control local services. It would be nice from a deployment standpoint to be able to control remote services as well.
Fortunately, the ServiceController class that the the module uses has the capability to control remote services - you just need to specify a host name. So adding this functionality would be trivial.
However, before I submit a pull request, I want to get people's opinion on what the optimal API would look like. Should I duplicate all the existing functions, calling them startRemoteService, stopRemoteService, etc., to avoid breaking existing scripts, or should I add a host argument to the existing functions?
One way that we could avoid duplication and still preserve compatibility is to allow the host to be specified as part of the name argument itself. So for example, to control a local service you would pass SomeService, whereas to control a remote service you would pass SomeMachine\SomeService. This seems like a nice compromise, although it depends on a non-standard way of specifying services on remote hosts. As far as I know there is no standard syntax for this.
The text was updated successfully, but these errors were encountered:
The
ServiceControllerHelpers
module contains functions for administering Windows services, such asstartService
,stopService
, etc. Currently, these functions can only control local services. It would be nice from a deployment standpoint to be able to control remote services as well.Fortunately, the
ServiceController
class that the the module uses has the capability to control remote services - you just need to specify a host name. So adding this functionality would be trivial.However, before I submit a pull request, I want to get people's opinion on what the optimal API would look like. Should I duplicate all the existing functions, calling them
startRemoteService
,stopRemoteService
, etc., to avoid breaking existing scripts, or should I add ahost
argument to the existing functions?One way that we could avoid duplication and still preserve compatibility is to allow the host to be specified as part of the
name
argument itself. So for example, to control a local service you would passSomeService
, whereas to control a remote service you would passSomeMachine\SomeService
. This seems like a nice compromise, although it depends on a non-standard way of specifying services on remote hosts. As far as I know there is no standard syntax for this.The text was updated successfully, but these errors were encountered: