Check disk health on Windows: diagnose and fix it from the command line
Check your Windows drives' hardware health, scan for file system errors, and schedule a repair — all from PowerShell and the command prompt.
What this covers
Strange slowdowns, files that won't open, or error messages about a drive can mean anything from a failing disk to simple file system corruption. This guide walks you from the hardware level up: confirm the drive itself is healthy, scan the file system, and schedule a repair if needed.
Symptom
Check the physical disk's health status
Start at the hardware layer. This shows each drive's health status (Healthy, Warning, Unhealthy) plus reliability counters like temperature, wear, and read errors. If any drive reports Warning or Unhealthy, back up your data immediately — the rest of this guide is about file system issues, not a failing drive. A Healthy result on all drives means you can move on to checking the file system.
Query health status, media type, and reliability counters (temperature, wear, errors) for every physical disk in PowerShell.
$ Get-PhysicalDisk | Select-Object FriendlyName, MediaType, HealthStatus, OperationalStatus, Size
Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object DeviceId, Temperature, Wear, ReadErrorsTotalScan the volume for file system errors
Even a physically healthy disk can have NTFS file system errors or bad sectors. Run an online scan on the system drive — it checks while Windows is running and fixes nothing, making it a safe diagnostic. A clean result ('no problems found') rules out file system corruption; reported errors mean you should schedule a repair (next step).
Diagnose NTFS file system errors and bad sectors on any volume — including the system drive while Windows is running — before committing to a repair.
$ chkdsk C: /scanRule out low free space (optional)
Disk 'health' complaints are sometimes just a nearly full drive causing slowness or errors. This optional check shows used and free gigabytes per drive. If a drive is nearly full, freeing space may resolve the symptoms without any repair needed.
A quick PowerShell table of used and free gigabytes across every local and mapped drive.
$ Get-PSDrive -PSProvider FileSystem | Format-Table Name, @{n='Used(GB)';e={[math]::Round($_.Used/1GB,1)}}, @{n='Free(GB)';e={[math]::Round($_.Free/1GB,1)}}Check the dirty bit and schedule a boot-time repair
If the earlier scan found problems, first check whether the volume is marked dirty. Then schedule a boot-time disk check so a full chkdsk repair runs at the next restart, when the drive isn't in use. After restarting, let the check finish — it can take a while on large drives. If the volume isn't dirty, you can skip the repair.
Use chkntfs to see if a volume is marked dirty and to add or cancel boot-time disk checks without a full chkdsk run.
$ chkntfs C:
chkntfs /c C:▾ Undo
$ chkntfs /x C:How to confirm it worked
After any repair, re-run the physical disk health query — every drive should report Healthy — and the file system scan should complete without reporting errors.
Undo everything
Every command above can be reverted. Run these in order to undo all of it.
$ chkntfs /x C:Review before running — some steps may not be independent.
Sources
- Get-PhysicalDiskEvidence: Documents HealthStatus and OperationalStatus properties on disk objects.
- Get-StorageReliabilityCounterEvidence: Documents temperature, wear, and error counters piped from Get-PhysicalDisk.
- chkdsk | Microsoft LearnEvidence: Microsoft documents chkdsk /scan as running an online scan on a volume, and /f with /r as locating bad sectors and recovering readable information.
- Check Disk - chkdsk - Windows CMDEvidence: SS64 explains that chkdsk without switches runs in read-only mode, while /f fixes errors found on the disk.
- Get-PSDriveEvidence: Documents Get-PSDrive -PSProvider FileSystem and the Used/Free byte properties of drive objects.
- chkntfsEvidence: Documents chkntfs volume reporting of the dirty bit and /c, /x scheduling switches.
Last verified: 2026-09-21
Related guides
Control what runs when Windows starts: open the Startup folder, change service startup types, and handle Fast Startup quirks.
A symptom-driven guide to a frozen Windows Update: check update history, repair system files and the component store, reset update components, and install via PowerShell.
A step-by-step problem-fix guide for Windows: identify your disks, rule out failing hardware, find the process or service hammering the disk, optimize the drive, and verify the file system is clean.