What SFC does
System File Checker (sfc.exe) verifies critical Windows system files against the trusted catalog and, when you request a scan that allows repair, replaces corrupted copies using the component store under WinSxS. That store is maintained by Component-Based Servicing (CBS)—the same subsystem DISM talks to—so a damaged store means SFC may report failures even when individual files look wrong.
Commands you actually use
| Invocation | Behavior | Notes |
|---|---|---|
sfc /scannow | Scan all protected system files; repair where possible | Requires elevated Administrator; can take many minutes |
sfc /verifyonly | Verify only—no repairs | Useful for audits or read-only diagnostics |
sfc /scanfile=<path> | Repair a specific file if it fails verification | Path must be under protected namespaces CBS tracks |
sfc /verifyfile=<path> | Verify one file without changing it | Pairs with targeted troubleshooting |
DISM first, then SFC (usually)
If the component store is inconsistent—updates interrupted, disk errors, malware—sfc /scannow may end with “found corrupt files but was unable to fix.” Run DISM repair online first (for example DISM /Online /Cleanup-Image /RestoreHealth with a working Windows Update path or an explicit /Source WIM/ESD), reboot if prompted, then rerun SFC. DISM rebuilds the repair source SFC depends on.
Logs and evidence
Console text is a summary only. The authoritative trace is %windir%\Logs\CBS\CBS.log (large, verbose). From an elevated command prompt, findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log surfaces many of the System File Checker summary lines Microsoft documents for quick triage—still correlate timestamps with your run.
Offline and edge cases
For a system that will not boot normally, Windows Recovery or WinPE can run SFC against the offline image with /offbootdir and /offwindir pointing at the affected installation’s boot volume and Windows directory. BitLocker-encrypted volumes must be unlocked first. Some corruption (deep registry hives, third-party filter drivers) is outside SFC’s scope—repair-install or clean deployment may remain the honest fix.
Related: Windows DISM explained, Windows CMD commands, CMD vs PowerShell.