<servicecontroller> Starts and stops a Windows service.
Attribute | Type | Description | Required |
---|
action | enum | The action that should be performed on the serviceeither Start, Stop, Restart, Pause, or Continue. | True |
service | string | The name of the service that should be controlled. | True |
machine | string | The name of the computer on which the service resides. The default is the local computer. | False |
timeout | double | The time, in milliseconds, the task will wait for the service to reach the desired status. The default is 5000 milliseconds. | False |
failonerror | bool | Determines whether task failure stops the build or is just reported. The default is true. | False |
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False |
unless | bool | Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. | False |
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False |
Example
<servicecontroller action="Start" service="w3svc" />