Windows automatic services over WinRM (win_services)
Counts the services set to start automatically that are not running, with one WQL query over WinRM:
SELECT Name,DisplayName,State,DelayedAutoStart FROM Win32_Service WHERE StartMode='Auto'
The same answer gives the running count, so one poll is one query whatever the number of services. Use it instead of one win_service sensor per service; keep win_service for the few services whose own history you want, such as a server's roles.
Transport. Under a Windows probe the device can be set to read this sensor over native WMI instead of WinRM; the query and the result are the same. The target is then set up as in the WMI setup guide instead.
What it looks like

The sensor's page after a few polls, watching a Windows Server domain controller reached over WinRM. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
not_running | Not running | Down when above max_not_running (0 by default) | |
running | Running | none |
The message names the counted services that are not running, display name first, up to ten, then how many more there are, how many are running and how many the exclusions left out:
1 automatic service(s) not running: Example Backup Agent (ExampleBackupAgent, stopped); 64 running; 6 left out by the exclusions
Parameters
| Parameter | Default | Meaning |
|---|---|---|
exclude | see below | Service short names to leave out. Case does not matter; * matches any run of characters (edgeupdate*). Setting it replaces the default list, so copy the defaults you want to keep. At most 200 names. |
include_delayed | false | Also count services set to "Automatic (Delayed Start)". |
max_not_running | 0 | How many counted services may be not running before the sensor is Down. |
port | 5985, or 5986 with https | TCP port of the WinRM listener. |
https | false | Use the HTTPS listener instead of HTTP with message encryption. |
accept_self_signed | false | Accept an HTTPS certificate that cannot be verified. The credential has the same switch; either one is enough. |
Suggested interval: 5 minutes. Credential: Windows. Discovery proposes one per Windows host.
What is left out, and why
Plenty of services are set to start automatically but are stopped on a healthy machine: they start, do their work and stop, or they start only when something triggers them. The sensor leaves out three kinds:
- Delayed start.
DelayedAutoStartis true for these, and several of them (Software Protection, Downloaded Maps Manager, the browser updaters) stop by design once their work is done. Setinclude_delayedto count them. Windows before Windows 10 and Server 2016 has no such property; the sensor then asks again without it, counts the delayed services as well, and says so in the message. - Trigger start. WQL cannot tell these apart:
Win32_Servicehas no trigger information, which lives in the registry under each service'sTriggerInfokey and is not readable through WMI. Services that are automatic and trigger-start, and therefore often stopped, are on the default exclusion list instead. - Per-user instances such as
CDPUserSvc_4f2a1, which get a new name at every logon.
The default exclude list, each entry a service that is stopped on a healthy machine:
| Name | Why |
|---|---|
AppXSvc | AppX Deployment Service. Trigger-start: runs while Store apps install or update. |
clr_optimization_* | .NET native image generation. Runs after a .NET update and stops. |
edgeupdate* | Browser updater service. Starts, checks for an update and stops. |
gpsvc | Group Policy Client. Trigger-start on current Windows; stopped between policy refreshes on many machines. |
gupdate* | Browser updater service of another vendor. Starts, checks for an update and stops. |
MapsBroker | Downloaded Maps Manager. Stops when it has nothing to do. |
RemoteRegistry | Trigger-start, and stops after a few minutes without a client. |
sppsvc | Software Protection. Stops when idle. |
On the Windows 11 machine the sensor was tested against, seven of 71 automatic services were stopped. Four were delayed-start, two (AppXSvc, gpsvc) were on the list, and the remaining one was a third-party agent that had stopped: the one finding worth a look.
On the target
WinRM enabled and an account set up as in the WinRM setup guide. A service whose security descriptor hides it from the account is not returned, and so is not counted.
Failures
The WinRM failures every Windows sensor shares are listed in the setup guide. Specific to this sensor:
| Message | Meaning |
|---|---|
Win32_Service lists no automatic services; the account may not see them (kind protocol) | Every Windows machine has automatic services, so the account is not allowed to list them. |