SFC (System File Checker)
System File Checker (sfc.exe) is a Windows tool that scans protected system files and replaces damaged or missing ones with correct copies from the component store. The common command is sfc /scannow, run from an elevated command prompt; results are logged in C:\Windows\Logs\CBS\CBS.log.
1Results and what they mean
'Windows Resource Protection did not find any integrity violations' means the protected files are fine.
'found corrupt files and successfully repaired them' means repairs were made; restart the PC.
'found corrupt files but was unable to fix some of them' usually means the component store is damaged: run DISM /Online /Cleanup-Image /RestoreHealth and then sfc /scannow again.
2Other switches
sfc /verifyonly scans without repairing. sfc /scanfile=<path> checks one file. /offbootdir and /offwindir let SFC repair an offline Windows, for example from the recovery environment.
How to run SFC
- Open Terminal (Admin) or Command Prompt as administrator.
- Run: DISM.exe /Online /Cleanup-Image /RestoreHealth
- Run:
sfc /scannow - Wait until verification reaches 100% and read the result message.
- Restart the PC if files were repaired.
Cautions
- Do not close the window while the scan runs.
- SFC only checks Windows system files; it does not repair programs, drivers or personal files.
Related articles
- DISM (Deployment Image Servicing and Management)What DISM is, the /CheckHealth, /ScanHealth and /RestoreHealth commands, and how DISM and SFC work together to repair Windows.
- Windows Recovery Environment (WinRE)What WinRE is, how to open it, what tools it offers, and how to check it with reagentc /info.
- WinSxS folder (component store)What C:\Windows\WinSxS is, why Explorer overstates its size, and how to shrink it only with supported DISM commands.
Sources
- sfc (Microsoft Learn) learn.microsoft.com
- Use the System File Checker tool (Microsoft Support) support.microsoft.com
Last reviewed: