---
date_published: 2026-08-13
date_modified: 2026-08-13
canonical_url: https://metricshub.org/community-connectors/connectors/windowsservice.html
---

 [Supported Platforms](../supported-platforms.html)   [Connectors Directory](../connectors-directory.html)

# Windows - Services (WMI)

## Description

Gives OS specific service information and metrics

[community](tags/community.html) [system](tags/system.html) [windows](tags/windows.html)

[Source](https://github.com/metricshub/community-connectors/tree/main/src/main/connector/system/WindowsService/WindowsService.yaml)

## Target

Typical platform: **[Microsoft Windows](platforms/microsoft-windows.html)**

Operating system: **Microsoft Windows**

## Prerequisites

Leverages: **WMI**

Technology and protocols: **WMI/WinRM**

Variables:

- `serviceNames`: Regular expression pattern to identify the services to monitor. (default: `.*`)

## Examples

### CLI

```batch
metricshub HOSTNAME -t win -c +WindowsService --wmi -u USER
```

### metricshub.yaml

```yaml
resourceGroups:
  <RESOURCE_GROUP>:
    resources:
      <HOSTNAME-ID>:
        attributes:
          host.name: <HOSTNAME> # Change with actual host name
          host.type: win
        connectors: [ +WindowsService ] # Optional, to load only this connector
        protocols:
          wmi:
            username: <USERNAME> # Change with actual credentials
            password: <PASSWORD> # Encrypted using metricshub-encrypt
        additionalConnectors:
          WindowsService: # Unique ID. Use 'uses' if different from the original connector ID
            uses: WindowsService # Optional - Original ID if not in key
            force: true # Optional (default: true); false for auto-detection only
            variables:
              serviceNames: <VALUE> # Replace with desired value.
```

## Connector Activation Criteria

The **Windows - Services (WMI)** connector **must be selected manually**, and its status will be reported as OK if all the below criteria are met:

- The **WMI query** below to the managed host succeeds: 
  
    - Namespace: `root\CIMv2`
    - WQL Query: `SELECT * FROM Win32_OperatingSystem`

## Metrics

| Type | Collected Metrics | Specific Attributes |
| --- | --- | --- |
| **service** | - `system.service.status{state="Continue Pending\|Pause Pending\|Paused\|Running\|Start Pending\|Stop Pending\|Stopped\|Unknown"}` | - `id` - `system.service.command` - `system.service.name` - `system.service.start` - `system.service.username` |
