# salt.modules.win_service

Windows Service module.

`salt.modules.win_service.` `available`(name)

  Returns `True` if the specified service is available, otherwise returns `False`.

  CLI Example:

      salt '*' service.available <service name>

`salt.modules.win_service.` `disable`(name, **kwargs)

  Disable the named service to start at boot

  CLI Example:

      salt '*' service.disable <service name>

`salt.modules.win_service.` `disabled`(name)

  Check to see if the named service is disabled to start on boot

  CLI Example:

      salt '*' service.disabled <service name>

`salt.modules.win_service.` `enable`(name, **kwargs)

  Enable the named service to start at boot

  CLI Example:

      salt '*' service.enable <service name>

`salt.modules.win_service.` `enabled`(name)

  Check to see if the named service is enabled to start on boot

  CLI Example:

      salt '*' service.enabled <service name>

`salt.modules.win_service.` `get_all`()

  Return all installed services

  CLI Example:

      salt '*' service.get_all

`salt.modules.win_service.` `get_disabled`()

  Return the disabled services

  CLI Example:

      salt '*' service.get_disabled

`salt.modules.win_service.` `get_enabled`()

  Return the enabled services

  CLI Example:

      salt '*' service.get_enabled

`salt.modules.win_service.` `get_service_name`(*args)

  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'

`salt.modules.win_service.` `getsid`(name)

  Return the sid for this windows service

  CLI Example:

      salt '*' service.getsid <service name>

`salt.modules.win_service.` `restart`(name)

  Restart the named service

  CLI Example:

      salt '*' service.restart <service name>

`salt.modules.win_service.` `start`(name)

  Start the specified service

  CLI Example:

      salt '*' service.start <service name>

`salt.modules.win_service.` `status`(name, sig=None)

  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]

`salt.modules.win_service.` `stop`(name)

  Stop the specified service

  CLI Example:

      salt '*' service.stop <service name>

Current Salt release: 0.17.1

#### Previous topic

salt.modules.win_servermanager

#### Next topic

salt.modules.win_shadow

### Quick search

Enter search terms or a module, class or function name.

### Upcoming SaltStack Events

My conferences on Lanyrd