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.

WindowsFilessystemstoragepowershellhealthDiagnosticsLow risk
Run a PowerShell health query against your physical disks first — it tells you in seconds whether a drive is actually failing or the problem is at the file system level.

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

?Windows feels slow for no clear reason, files fail to open or copy, error dialogs mention a corrupted disk or a drive needs to be scanned, or a drive keeps dropping out.

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.

Command
$ Get-PhysicalDisk | Select-Object FriendlyName, MediaType, HealthStatus, OperationalStatus, Size
Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object DeviceId, Temperature, Wear, ReadErrorsTotal

Scan 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.

Command
$ chkdsk C: /scan

Rule 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.

Command
$ 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.

Command
$ chkntfs C:
chkntfs /c C:
▾ Undo
Undo
$ chkntfs /x C:
!If any disk reports Warning or Unhealthy health status, stop troubleshooting and back up your data immediately; repairs cannot recover a physically failing drive. Do not interrupt a boot-time chkdsk once it has started.

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.

Undo everything
$ chkntfs /x C:

Review before running — some steps may not be independent.

Sources

  • Get-PhysicalDisk
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents HealthStatus and OperationalStatus properties on disk objects.
  • Get-StorageReliabilityCounter
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents temperature, wear, and error counters piped from Get-PhysicalDisk.
  • chkdsk | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: 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 CMD
    SS64 · technical · 2026-09-17
    Evidence: SS64 explains that chkdsk without switches runs in read-only mode, while /f fixes errors found on the disk.
  • Get-PSDrive
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents Get-PSDrive -PSProvider FileSystem and the Used/Free byte properties of drive objects.
  • chkntfs
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents chkntfs volume reporting of the dirty bit and /c, /x scheduling switches.

Last verified: 2026-09-21

Related guides