How to Query and Audit Disk and Drive Health in Windows 11 Using PowerShell

Hard disk drives (HDDs) and Solid State Drives (SSDs) are the foundation of workstation reliability and data integrity. Over time, storage drives degrade due to read/write endurance limits, sudden power interruptions, or physical controller failures. If bad sectors or file system corruptions go undetected, users risk unexpected Blue Screens of Death (BSODs), corrupted application files, and unrecoverable data loss.

While third-party hardware diagnostic utilities exist, Windows 11 includes a robust suite of native PowerShell storage cmdlets capable of querying drive operational health, extracting Self-Monitoring, Analysis, and Reporting Technology (SMART) indicators, verifying bus connection protocols (NVMe, SATA, USB), and initiating non-destructive file system scans. This tutorial explains how to query and audit disk and drive health in Windows 11 using native PowerShell cmdlets.


Auditing Physical Drive Health (Get-PhysicalDisk)

The Get-PhysicalDisk cmdlet queries the physical storage hardware directly, bypassing logical partition layouts. To inspect every physical drive installed in your workstation, open PowerShell as Administrator and run:

# Query physical disk hardware status and operational health
Get-PhysicalDisk | Select-Object -Property DeviceId, FriendlyName, MediaType, BusType, OperationalStatus, HealthStatus, Size | Format-Table -AutoSize

This command returns essential diagnostic fields for each attached drive:

  • FriendlyName: The manufacturer model and drive description (e.g. Samsung SSD 990 PRO 2TB).
  • MediaType: Distinguishes between SSD, HDD, or Unspecified.
  • BusType: Identifies the hardware connection interface (e.g. NVMe, SATA, RAID, or USB).
  • HealthStatus: Reports the drive’s SMART condition. A healthy drive returns Healthy. Any other value (such as Warning or Unhealthy) signals imminent hardware failure.
  • OperationalStatus: Should display OK. Values such as Degraded, Predictive Failure, or Lost Communication indicate immediate replacement is required.

Filtering for At-Risk and Failing Drives

In enterprise fleet environments or home servers with multiple storage drives, you can filter specifically for drives that are reporting anomalous operational or SMART states:

# Alert on any physical drive reporting a non-healthy status
$failingDrives = Get-PhysicalDisk | Where-Object { $_.HealthStatus -ne "Healthy" -or $_.OperationalStatus -ne "OK" }

if ($failingDrives) {
    Write-Warning "Hardware alert: Degraded or failing storage drive(s) detected!"
    $failingDrives | Format-Table -Property DeviceId, FriendlyName, HealthStatus, OperationalStatus
} else {
    Write-Host "All physical drives report Healthy operational status." -ForegroundColor Green
}

Auditing Disk Partition Layouts (Get-Disk)

While Get-PhysicalDisk queries the raw hardware, the Get-Disk cmdlet inspects the logical disk layer, partition tables (GPT vs MBR), and operational readiness:

# Query disk partition schemes and read-only status
Get-Disk | Select-Object -Property Number, FriendlyName, PartitionStyle, OperationalStatus, HealthStatus, IsReadOnly, IsOffline | Format-Table -AutoSize

Verify that your primary boot drive is formatted using GPT (GUID Partition Table) to ensure compatibility with Windows 11 UEFI Secure Boot requirements, and ensure that IsReadOnly is set to False.


Auditing Volume Health and Free Space (Get-Volume)

To inspect logical drive letters (such as C: or D:), file systems, and remaining capacity:

# Query drive letters, file system types, and capacity
Get-Volume | Select-Object -Property DriveLetter, FileSystemLabel, FileSystem, HealthStatus, OperationalStatus, 
    @{Name="Size (GB)"; Expression={[math]::round($_.Size / 1GB, 2)}},
    @{Name="FreeSpace (GB)"; Expression={[math]::round($_.SizeRemaining / 1GB, 2)}},
    @{Name="% Free"; Expression={[math]::round(($_.SizeRemaining / $_.Size) * 100, 1)}} | 
    Format-Table -AutoSize

If any volume displays a HealthStatus of anything other than Healthy, file system corruption has occurred.


Running Online File System Diagnostics (Repair-Volume)

Traditionally, checking file systems required scheduling an offline chkdsk /f scan that forced a reboot. In Windows 11, the PowerShell Repair-Volume cmdlet allows you to run online, non-destructive file system scans while Windows remains running:

1. Scan the Volume for Errors (Non-Destructive)

# Scan drive C: for file system anomalies without taking it offline
Repair-Volume -DriveLetter C -Scan

The command will output NoErrorsFound if the NTFS or ReFS metadata is intact.

2. Analyze and Flag Required Repairs

# Analyse the volume to determine if an offline repair is necessary
Repair-Volume -DriveLetter C -Analyze

3. Online Self-Healing (SpotFix)

If minor file system inconsistencies are detected, NTFS supports online self-healing. Run SpotFix to repair issues in seconds without a lengthy drive-wide scan:

# Initiate a targeted SpotFix repair on drive C:
Repair-Volume -DriveLetter C -SpotFix

Exporting an Automated Drive Health Report to CSV

To automate administrative monitoring, you can compile physical disk details and volume health into a single exported audit report:

# Generate and export comprehensive storage audit
$reportPath = "$env:USERPROFILE\Desktop\Disk_Health_Audit.csv"

Get-PhysicalDisk | Select-Object DeviceId, FriendlyName, MediaType, BusType, HealthStatus, OperationalStatus,
    @{Name="Size_GB"; Expression={[math]::round($_.Size / 1GB, 2)}} | 
    Export-Csv -Path $reportPath -NoTypeInformation

Write-Host "Storage health audit report exported to $reportPath" -ForegroundColor Green

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.