Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

ServiceControl

Contains functions which can be used to start other tools.

Functions and values

Function or valueDescription
checkRemoteServiceExists host name
Signature: host:string -> name:string -> bool

Returns whether a remote service with the given name exists.

Parameters

  • host - The hostname of the remote machine.
  • name - The name of the service in question.
checkServiceExists(name)
Signature: name:string -> bool

Returns whether a local service with the given name exists.

Parameters

  • name - The name of the service in question.
ensureRemoteServiceHasStarted(...)
Signature: host:string -> name:string -> timeout:TimeSpan -> unit

Waits until the remote service with the given name has been started or fails after given timeout

Parameters

  • host - The hostname of the remote machine.
  • name - The name of the service in question.
  • timeout - The timespan to time out after.
ensureRemoteServiceHasStopped(...)
Signature: host:string -> name:string -> timeout:TimeSpan -> unit

Waits until the remote service with the given name has been stopped or fails after given timeout

Parameters

  • host - The hostname of the remote machine.
  • name - The name of the service in question.
  • timeout - The timespan to time out after.
ensureServiceHasStarted name timeout
Signature: name:string -> timeout:TimeSpan -> unit

Waits until the local service with the given name has been started or fails after given timeout

Parameters

  • name - The name of the service in question.
  • timeout - The timespan to time out after.
ensureServiceHasStopped name timeout
Signature: name:string -> timeout:TimeSpan -> unit

Waits until the local service with the given name has been stopped or fails after given timeout

Parameters

  • name - The name of the service in question.
  • timeout - The timespan to time out after.
RunRemoteService(...)
Signature: command:string -> host:string -> serviceName:string -> unit

Sends a command to a remote windows service.

RunService command serviceName
Signature: command:string -> serviceName:string -> unit

Sends a command to a local windows service.

startRemoteService host name
Signature: host:string -> name:string -> unit

Starts all remote services with given name.

Parameters

  • host - The hostname of the remote machine.
  • name - The name of the services in question.
StartRemoteService host serviceName
Signature: host:string -> serviceName:string -> unit

Starts a remote windows service. Waits up to two minutes for a response.

startService(name)
Signature: name:string -> unit

Starts all local services with given name.

Parameters

  • name - The name of the services in question.
StartService(serviceName)
Signature: serviceName:string -> unit

Starts a local windows service. Waits up to two minutes for a response.

stopRemoteService host name
Signature: host:string -> name:string -> unit

Stops all services with given name.

Parameters

  • host - The hostname of the remote machine.
  • name - The name of the services in question.
StopRemoteService host serviceName
Signature: host:string -> serviceName:string -> unit

Stops a remote windows service. Waits up to two minutes for a response.

stopService(name)
Signature: name:string -> unit

Stops all local services with given name.

Parameters

  • name - The name of the services in question.
StopService(serviceName)
Signature: serviceName:string -> unit

Stops a local windows service. Waits up to two minutes for a response.