How to Use System File Checker (SFC) to Repair Corrupted Windows 11 Files
Run SFC /scannow to detect and repair corrupted system files in Windows 11. Covers online scans, DISM repair when SFC fails, and offline recovery from WinRE.
- Difficulty
- Beginner
- Time required
- 15 minutes
- Steps
- 6
- Platform
- Windows 11

Table of contents
Quick Answer
Go to the stepsOpen Command Prompt as administrator, type sfc /scannow, and press Enter. The scan checks all protected system files and replaces corrupted ones with clean copies from the WinSxS component store. If SFC can't fix some files, run DISM /Online /Cleanup-Image /RestoreHealth first, then retry SFC.
- Open Command Prompt or Windows Terminal as administrator.
- Type sfc /scannow and press Enter. Wait for completion.
- If SFC can't fix files, run DISM /Online /Cleanup-Image /RestoreHealth.
- After DISM, run sfc /scannow again.
- Restart and test if the issue is resolved.
sfc /scannowExpected result: SFC reports corrupt files successfully repaired or no integrity violations found.
Key takeaways
- Run sfc /scannow as administrator to detect and repair corrupted system files. If it can't fix everything, run DISM /Online /Cleanup-Image /RestoreHealth first, then retry SFC.
Before you start
- Access
- An administrator account on the Windows 11 device.
- Required roles
- Local administrator
- Required licenses
- Windows 11 (any edition)
- Environment
- Windows 11 with Command Prompt, Terminal, or PowerShell. Internet connection needed for DISM /RestoreHealth.
- Vendor
- Microsoft
- Tested environment
- Verified against Microsoft Support documentation for SFC and DISM, July 2026.
- Administrator permissions required
Warning: Don't interrupt an SFC scan
Never close the command window or shut down while SFC is running. Interrupting can cause additional corruption.
Note: Keep your device plugged in
On laptops, connect the charger before starting. Scans can take 15 to 30 minutes.
1Open an elevated command prompt
Launch Command Prompt or Terminal with administrator privileges.
Press Windows + X to open the Power User menu, then click Windows Terminal (Admin) or Command Prompt (Admin). Alternatively, click Start, type cmd, right-click Command Prompt, and select Run as administrator. Click Yes on the UAC prompt.
Expected result: A command window opens with Administrator in the title bar.
Note
Both Command Prompt and Windows Terminal work identically for SFC. PowerShell also accepts the same syntax.
2Run the SFC scan
Scan all protected system files and replace corrupted ones with clean copies from the WinSxS component store.
Type sfc /scannow and press Enter. The scan checks all protected OS files and replaces corrupted versions with clean copies from the WinSxS component store. It takes 5 to 15 minutes on an SSD, longer on a hard drive. Don't close the window or interrupt the process.
sfc /scannowExpected result: Scan completes with one of four Windows Resource Protection result messages.
Note
SFC uses the Windows component store (WinSxS folder), not the legacy dllcache folder from Windows XP. The WinSxS folder at C:\Windows\WinSxS contains verified copies of every system file version.
3Interpret the scan results
Understand what SFC found and determine the next action.
SFC displays one of four messages: (1) No integrity violations found, meaning files are clean. (2) Corrupt files successfully repaired, meaning restart and test. (3) Corrupt files found but unable to fix some, meaning run DISM next. (4) Could not perform the requested operation, meaning try Safe Mode or WinRE.
To see which files were scanned and repaired, extract the SFC log by running: findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt". This creates a file on your desktop with details.
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"Expected result: You understand the scan result and know the next action.
Note
The sfcdetails.txt file shows entries tagged [SR] from the CBS.log. Check the most recent timestamps to find relevant entries for your scan.
4Run DISM if SFC can't fix files
Repair the Windows component store so SFC can access clean file copies.
If SFC couldn't fix files, the component store (WinSxS) is likely damaged. Run DISM to repair it. First run DISM /Online /Cleanup-Image /CheckHealth for a quick check, then DISM /Online /Cleanup-Image /RestoreHealth to download and replace corrupted files. This requires internet and takes 15 to 30 minutes.
After DISM completes, run sfc /scannow again. This two-step process (DISM then SFC) resolves most cases where SFC alone fails.
DISM /Online /Cleanup-Image /RestoreHealthExpected result: DISM reports the restore operation completed successfully. The subsequent SFC scan can repair remaining files.
Note
If DISM can't reach Windows Update, mount a Windows 11 ISO and run: DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim /LimitAccess (replace D: with the ISO drive letter).
5Run SFC offline from Windows Recovery Environment
Repair system files when Windows won't boot or SFC fails repeatedly online.
Boot into Windows Recovery Environment: from Settings > System > Recovery > Advanced startup > Restart now, or boot from Windows 11 installation media and click Repair your computer. Go to Troubleshoot > Advanced options > Command Prompt.
Drive letters change in WinRE. Run diskpart, then list volume, then exit to find your Windows drive. Test with dir D:\Windows (try different letters). Once found, run sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows with your actual drive letter.
sfc /scannow /offbootdir=D:\ /offwindir=D:\WindowsExpected result: SFC scans the offline Windows installation and displays a completion message. Restart and test if Windows boots normally.
Note
/offbootdir points to the boot volume and /offwindir points to the Windows folder. If your boot partition is separate from Windows, the drive letters may differ.
6Review logs and troubleshoot persistent issues
Examine SFC logs and resolve persistent issues.
Extract the SFC log to a readable file. Open sfcdetails.txt and look for entries with recent timestamps. Files marked Cannot repair need manual attention or indicate a deeper problem.
If SFC hangs, try Safe Mode. For access denied errors, confirm admin rights and disable antivirus temporarily. For persistent corruption, run chkdsk /f /r to check disk errors. If SFC finds nothing but issues persist, run Windows Memory Diagnostic (mdsched.exe) or check Event Viewer for other error sources.
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"Expected result: You can identify specific failed files or confirm the issue isn't system file corruption.
Note
Persistent corruption that survives DISM and SFC can indicate failing storage hardware. Run the manufacturer's diagnostic tool (CrystalDiskInfo, Samsung Magician, etc.) to check drive health.
How to Confirm System Files Are Repaired
Verify fix
After running SFC and restarting, test whether your original issue is resolved. Run sfc /scannow a second time to confirm: if it reports no integrity violations, your system files are clean.
Check sfcdetails.txt for entries from the latest scan. All entries should show successful repairs with no Cannot repair lines.
If symptoms persist despite clean SFC and DISM results, the issue is likely not system file corruption. Check Event Viewer, run memory diagnostics, or test with a clean boot.
Normal result: SFC reports no integrity violations on follow-up scan. Original symptoms resolved.
Abnormal result: SFC still finds unfixable corruption, or original symptoms persist. May indicate disk or RAM hardware issues.
No integrity violations
Clean system
All system files match expected versions.
Corrupt files repaired
Fixed successfully
Restart and test. Run SFC again to confirm.
Unable to fix
Component store damaged
Run DISM /RestoreHealth first, then retry SFC.
Could not perform
SFC can't run
Try Safe Mode or offline WinRE method.
Troubleshooting
SFC reports corrupt files but can't fix them
Warning
Cause: The Windows component store (WinSxS) is also corrupted.
Run DISM /Online /Cleanup-Image /RestoreHealth to repair the component store. After DISM completes, run sfc /scannow again. If DISM can't reach Windows Update, use a mounted Windows 11 ISO as the source.
SFC scan hangs or freezes
Note
Cause: A locked or in-use file prevents scanning. Antivirus can also interfere.
Wait at least 30 minutes before assuming it's stuck. SFC can pause at certain percentages. If genuinely frozen, boot into Safe Mode and retry. Temporarily disable third-party antivirus.
SFC could not perform the requested operation
Warning
Cause: Windows resources needed by SFC are unavailable.
Boot into Safe Mode and retry sfc /scannow. If that fails, use the offline WinRE method with /offbootdir and /offwindir parameters.
SFC finds no issues but Windows problems persist
Note
Cause: The issue may be drivers, registry corruption, faulty RAM, or a failing drive.
Check Event Viewer for error codes. Run Windows Memory Diagnostic (mdsched.exe) to test RAM. Run chkdsk /f /r to check disk errors. Try a clean boot (msconfig > Services > Hide all Microsoft services > Disable all) to rule out third-party conflicts.
Persistent corruption keeps returning after SFC repairs
Critical
Cause: Failing SSD/HDD or faulty RAM keeps corrupting files after repair.
Back up data immediately. Run the storage manufacturer's diagnostic tool and Windows Memory Diagnostic. If hardware is failing, replace it before further repairs.
Frequently asked questions
How long does SFC /scannow take in Windows 11?
Typically 5 to 15 minutes on an SSD, up to 30 minutes on a hard drive. Don't interrupt it, even if it pauses at certain percentages.
What's the difference between SFC and DISM?
SFC checks individual system files against the WinSxS component store. DISM repairs the component store itself and can download fresh files from Windows Update. Run DISM first when SFC can't fix files, then retry SFC.
Can I run SFC if Windows 11 won't boot?
Yes. Boot from installation media or access Windows Recovery Environment. Open Command Prompt, identify your Windows drive letter (it may differ from C:), then run sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows with your actual drive letter.
Is SFC safe to run while using Windows normally?
Yes. SFC only replaces corrupted files with verified copies. It doesn't modify healthy files. Run it with administrator privileges and avoid resource-intensive apps during the scan.
Does SFC use the dllcache folder to repair files?
No. The dllcache folder was used in Windows XP. Since Windows Vista, SFC uses the Windows component store in the WinSxS folder (C:\Windows\WinSxS), which contains verified copies of every system file version.
Conclusion
SFC /scannow is the first tool to reach for when Windows 11 shows signs of system file corruption. It replaces damaged files with clean copies from the WinSxS component store. When SFC can't complete repairs, DISM fixes the component store by downloading fresh files from Windows Update.
For unbootable devices, offline SFC from the Windows Recovery Environment provides a way to repair files without a running OS.
Run sfc /scannow as administrator to detect and repair corrupted system files. If it can't fix everything, run DISM /Online /Cleanup-Image /RestoreHealth first, then retry SFC.
Command Prompt (Admin) > sfc /scannowSources2




