Windows

sfc /scannow and DISM /RestoreHealth — the Right Order to Repair Windows

Published ✓ Verified ⏱️ 3 min read June 29, 2026 · by Ryan Bennett

When Windows files are corrupt, two built-in tools repair them — but they work best in a specific order, and most “just run sfc /scannow” advice gets it backwards.

Run DISM first, then SFC. Microsoft’s guidance is explicit: “DISM provides the files required to repair your corrupted files. You should run DISM prior to running the System File Checker.”

The two commands

Open Command Prompt or PowerShell as Administrator:

DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Run DISM first and wait for “The operation completed successfully.” Then run sfc /scannow and let it reach “Verification 100% complete.” Don’t close the window before it finishes.

Why this order: DISM repairs the component store — the C:\Windows\WinSxS folder — which is the source SFC copies known-good files from. Fix the source first, then let SFC fix the live system files.

What DISM’s switches do

  • /CheckHealth — fast; only reports whether corruption was already flagged.
  • /ScanHealth — scans for component-store corruption (no repair).
  • /RestoreHealth — scans and repairs, pulling good files from Windows Update by default.

Reading the SFC result

  • “Windows Resource Protection did not find any integrity violations.” — nothing was wrong.
  • “…found corrupt files and successfully repaired them.” — fixed; details are in the log.
  • “…found corrupt files but was unable to fix some of them.” — check the log, then re-run DISM or replace the file(s) manually.
  • “…could not perform the requested operation.” — run SFC in Safe Mode, and make sure the PendingDeletes and PendingRenames folders exist under %WinDir%\WinSxS\Temp.

To pull just the SFC entries out of the log onto your desktop:

findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfcdetails.txt"

When Windows Update is broken (DISM can’t fetch files)

/RestoreHealth defaults to Windows Update as its repair source. If that’s broken — for example DISM fails with 0x800f081f “The source files could not be found” — point it at a known-good Windows image and block the Update fallback with /LimitAccess:

DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\mount\windows /LimitAccess

Or use an install.wim from a mounted ISO, specifying the image index:

DISM /Online /Cleanup-Image /RestoreHealth /Source:Wim:D:\sources\install.wim:1 /LimitAccess

The source must be the same OS version, patched to at least your current update level. If the store itself is the problem, see component store corruption (0x80073712).

FAQ

Which do I run first? DISM, then SFC — on Windows 10 and 11. DISM repairs the store that SFC pulls its replacement files from.

DISM /RestoreHealth looks stuck at 20% (or 62.3%) — is it frozen? Microsoft only promises it “takes several minutes,” and a long pause at a fixed percentage is widely reported as normal. Give it 30–60 minutes and don’t close the window.

SFC says it couldn’t fix some files — now what? Generate sfcdetails.txt with the findstr command above, check the most recent entries, then re-run DISM /RestoreHealth (with /Source if Windows Update is down).

Do I need internet for DISM? By default yes — Windows Update is the repair source. Offline, you must supply /Source: and add /LimitAccess.

Sources: Microsoft — Use the System File Checker tool, Microsoft — Repair a Windows Image (DISM), Microsoft — Fix Windows Update errors with DISM and SFC

↑↓ navigate · ↵ open · Esc close See all results →