service::get-status

[This is preliminary documentation and subject to change.]

Gets the status of the specified service.

Usage

ServiceControllerStatus service::get-status(service, machineName)

Parameters

Name Type Description
service string The short name that identifies the service to the system.
machineName string The computer on which the service resides.

Return Value

One of the ServiceControllerStatus values that indicates whether the service is running, stopped, or paused, or whether a start, stop, pause, or continue command is pending.

Remarks

For the machineName parameter, you can use "." or a zero-length String to represent the local computer.

The value returned by service::get-status() can be compared to either a corresponding enum field name or the underlying integral value.

Examples

Requirements

Assembly: NAnt.Contrib.Tasks (0.85.2344.0)