Windows Service module.
Disable the named service to start at boot
CLI Example:
salt '*' service.disable <service name>
Check to see if the named service is disabled to start on boot
CLI Example:
salt '*' service.disabled <service name>
Enable the named service to start at boot
CLI Example:
salt '*' service.enable <service name>
Check to see if the named service is enabled to start on boot
CLI Example:
salt '*' service.enabled <service name>
Return all installed services
CLI Example:
salt '*' service.get_all
Return the disabled services
CLI Example:
salt '*' service.get_disabled
Return the enabled services
CLI Example:
salt '*' service.get_enabled
The Display Name is what is displayed in Windows when services.msc is executed. Each Display Name has an associated Service Name which is the actual name of the service. This function allows you to discover the Service Name by returning a dictionary of Display Names and Service Names, or filter by adding arguments of Display Names.
If no args are passed, return a dict of all services where the keys are the service Display Names and the values are the Service Names.
If arguments are passed, create a dict of Display Names and Service Names
CLI Example:
salt '*' service.get_service_name
salt '*' service.get_service_name 'Google Update Service (gupdate)' 'DHCP Client'
Return the sid for this windows service
CLI Example:
salt '*' service.getsid <service name>
Restart the named service
CLI Example:
salt '*' service.restart <service name>
Start the specified service
CLI Example:
salt '*' service.start <service name>
Return the status for a service, returns the PID or an empty string if the service is running or not, pass a signature to use to find the service via ps
CLI Example:
salt '*' service.status <service name> [service signature]
Stop the specified service
CLI Example:
salt '*' service.stop <service name>