---
date_published: 2026-08-13
date_modified: 2026-08-13
canonical_url: https://metricshub.org/community-connectors/connectors/diskpart.html
---

 [Supported Platforms](../supported-platforms.html)   [Connectors Directory](../connectors-directory.html)

# Windows - DiskPart

## Description

This connector discovers and monitors the logical disks in a Microsoft Windows system through the DISKPART.EXE utility.

This connector is superseded by: 

- [WinStorageSpaces](winstoragespaces.html)

[community](tags/community.html) [hardware](tags/hardware.html) [windows](tags/windows.html)

[Source](https://github.com/metricshub/community-connectors/tree/main/src/main/connector/hardware/DiskPart/DiskPart.yaml)

## Target

Typical platform: **[Microsoft Windows](platforms/microsoft-windows.html)**

Operating system: **Microsoft Windows**

## Prerequisites

Leverages: **The DISKPART.EXE command-line utility**

Technology and protocols: **Commands**

**This connector is not available for remote hosts (it is applicable to the local host only).**

## Examples

### CLI

```batch
metricshub HOSTNAME -t win -c +DiskPart --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: [ +DiskPart ] # Optional, to load only this connector
        protocols:
          wmi:
            username: <USERNAME> # Change with actual credentials
            password: <PASSWORD> # Encrypted using metricshub-encrypt
```

## Connector Activation Criteria

The **Windows - DiskPart** connector will be automatically activated, and its status will be reported as OK if all the below criteria are met:

- Operating System is **Microsoft Windows**
- The command below succeeds on the monitored host 
  
    - Command: `CHCP 437&&DISKPART.EXE /S ${file::exit.txt}`

## Metrics

| Type | Collected Metrics | Specific Attributes |
| --- | --- | --- |
| **logical_disk** | - `hw.logical_disk.limit` - `hw.status{hw.type="logical_disk", state="degraded\|failed\|ok"}` - `hw.status{hw.type="logical_disk", state="present"}` | - `hw.parent.type` - `id` - `info` - `name` - `raid_level` |
