Scan and repair Windows system files with SFC

Use the System File Checker to verify every protected Windows system file against known-good copies and automatically replace the damaged ones.

WindowssystemTerminalDiagnosticsLow risk
Open an elevated Command Prompt and run `sfc /scannow` to scan all protected system files and repair any corruption it finds.

01Command

Command
$ sfc /scannow

02What it does

SFC compares every file in the Windows component store's protected list against a manifest and pulls clean replacements from WinSxS or Windows installation media. The scan takes 5-20 minutes and writes progress to the console. Read the summary at the end: it either found no violations, repaired files, or could not fix everything. When it cannot complete a repair, run `DISM /Online /Cleanup-Image /RestoreHealth` first and re-run SFC. Full details are logged in `%windir%\Logs\CBS\CBS.log` (filter with `findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log`).

03Risk

RiskLow risk
RequirementsMust run in an elevated Command Prompt or PowerShell window (Run as administrator).
!Warning: Do not close the console window while the scan is running; interrupting SFC can leave system files in a half-repaired state.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • sfc | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents that 'sfc /scannow' scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions.
  • System File Checker (sfc) - Windows CMD
    SS64 · technical · 2026-09-17
    Evidence: SS64 describes the /scannow switch as scanning all protected system files immediately and repairing problems found.

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions