Service.Control
Top  Previous  Next


Starts or stops a service or sets startup mode

Category
Service

Script section
All

Service.Control ServiceName, Action

ServiceName
Name of service  

Action

Options: Start | Stop | Automatic | Manual | Disable  
·Start - start service  
·Stop - stop service  
·Automatic - set service startup mode to automatic  
·Manual - set service startup mode to manual  
·Disable - set service startup mode to disable  

Other parameters
This command is executed on the current machine in the [Machines] section.  

Example

Manage the "task scheduler" service on machine \\main04:
Batch: stop the service and set service startup mode to disable.
Undo: set service startup mode to automatic and start the service.

[Settings_Begin]
//At least one line here
[Settings_End]

[Machines_Begin]
\\MAIN04
[Machines_End]

[Batch_Begin]
Service.Control Schedule, Stop
Service.Control
 Schedule, Disable
[Batch_End]

[Undo_Batch_Begin]
Service.Control Schedule, Automatic   
Service.Control Schedule, Start   
[Undo_Batch_End]