The Win Services Plug-in already has a built-in options to start and stop the selected service.
This article will tackle how to automatically start & stop a service via rule > action > and command.
1. Create a command that will start the service.
- Target of the command must be any cell from the dataview (aside from the cells of the first column).
- This will be a task type command that will use an internal command - /PLUGIN:WIN-SERVICES:startService
2. Make an action that will call the command.
3. Define a rule.
This is to set the severity of the cell to critical when the status of the service turns into Stopped. This rule will also call the action which will call the command that will auto-start the service.
- Target of the rule must be the status column cell/s of the dataview.
Attached is the XML of the command, action, and rule.