Your Windows PC is throwing stability errors, crashing randomly, or refusing to boot properly. Before you assume the worst, there's a built-in tool that catches about 80% of these issues without a trip to a repair shop: sfc /scannow. It hunts down corrupted system files and fixes them. Most people never touch it. That's a mistake.
TL;DR
sfc /scannow (System File Checker) scans Windows system files for corruption and repairs them automatically. Run it from elevated Command Prompt with 'sfc /scannow'. If it reports files it can't fix, run DISM /RestoreHealth first, then rerun sfc /scannow. Success rate is 85% for fixing stability issues caused by file corruption.
Key Takeaways
- sfc /scannow detects and repairs corrupted Windows system files in 5-15 minutes
- DISM /RestoreHealth repairs the Windows component store first; run it before sfc if files cannot be repaired
- Always open Command Prompt as administrator; sfc requires full system access
- Restart after repairs complete to apply changes and stabilize the system
- Run from Safe Mode with Command Prompt if normal mode encounters file locking issues
- Review CBS.log in %windir%\Logs\CBS\ for detailed repair logs and specific file paths
At a Glance
- Difficulty: Easy to Medium
- Time Required: 15, 45 minutes
- Success Rate: 85% for file corruption issues
What Causes sfc /scannow System File Checker Issues?
sfc /scannow detects problems because your Windows system files have gone wrong. But how do clean, protected files get corrupted in the first place?
The most common culprit is a failed or interrupted Windows Update. Updates touch thousands of system files. If power cuts out mid-update, or if your PC crashes during installation, some files get left in a broken state. Your component store (WinSxS folder) holds backup copies of these files. If that backup store itself gets damaged, sfc can't do its job properly. This is where DISM comes in later.
Malware is another common cause. Some unwanted software deliberately modifies system files to hide itself or persist through reboots. When your antivirus removes the malware, it sometimes leaves those files orphaned or partially deleted. sfc catches these gaps and restores legitimate versions.
Disk errors matter too. A bad sector on your hard drive can corrupt any file stored in that location, including system files. If your SSD has TRIM disabled or your mechanical drive is aging, read errors introduce bit rot into critical files. Blue screens and random crashes often follow.
Power loss during system operations is particularly nasty. A sudden shutdown during servicing can leave transaction logs incomplete and file metadata broken. Windows uses journaling to prevent this, but determined power cuts can overload even that safety net.
Finally, aggressive third-party tweaking tools and unsupported system modifications can damage the component store or system files directly. Avoid any "optimizer" or "cleaner" that claims to improve Windows performance by modifying system directories. They don't understand what they're touching, and cleanup usually means corruption.
sfc /scannow Quick Fix: Run the Basic Scan
Quick System File Check Easy
- Check for pending Windows updates first
Open Settings (Windows key + I), navigate to System > Windows Update, and click 'Check for updates'. Install any available updates and restart. sfc works better when Windows is current. - Open Command Prompt as administrator
Press Windows key, type 'command prompt', right-click the result, and select 'Run as administrator'. Click 'Yes' at the UAC prompt. - Run the scan
Type the command exactly:sfc /scannow
Press Enter. Don't close this window or use your PC while the scan runs. It needs exclusive access to system files. - Wait for completion
You'll see a progress bar. When it reaches 100% and displays 'Verification 100% complete', read the result message. - Interpret the result
You'll see one of three outcomes:
'Windows Resource Protection did not find any integrity violations' = No problems. You're done.
'Windows Resource Protection found corrupt files and successfully repaired them' = Corruption fixed. Restart your PC now.
'Windows Resource Protection found corrupt files but was unable to fix some of them' = Component store is damaged. Move to the Intermediate tier below. - Restart your computer
Close Command Prompt and restart. Changes take effect on reboot.
More Robust Solutions: DISM RestoreHealth + sfc /scannow
If the quick fix worked, you're done. But if sfc reported it couldn't repair some files, the problem is upstream: your Windows component store itself is corrupted. sfc depends on WinSxS (the component store folder) to find clean copies of broken files. When WinSxS is broken, sfc has nothing to copy from. This is where DISM comes in.
Microsoft's official guidance says to run DISM first, then rerun sfc. DISM reaches out to Windows Update to download fresh copies of system components and repair the store. Once that's fixed, sfc can finally repair the individual files it couldn't touch before.
Repair Windows Component Store with DISM Medium
- Open elevated Command Prompt again
Windows key, search 'command prompt', right-click, 'Run as administrator'. - Run DISM RestoreHealth
Type:DISM.exe /Online /Cleanup-image /Restorehealth
Press Enter. This command downloads and repairs the Windows component store using Windows Update as the source. It may take 10, 20 minutes. Don't interrupt it. - Wait for the success message
You'll see progress. When complete, you should see 'The operation completed successfully'. If DISM fails because it can't reach Windows Update, and you have Windows installation media (USB or DVD), you can specify an alternate source:DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.esd /LimitAccess
Replace D: with your media drive letter and adjust the path if needed. /LimitAccess tells DISM to use only that source, not Windows Update. - Rerun sfc /scannow
Once DISM finishes successfully, run sfc again:sfc /scannow
Now that the component store is repaired, sfc should be able to fix files it couldn't touch before. - Check the result
sfc will report whether repairs succeeded. If it finds and fixes files, restart. If it still reports unfixable files, move to Advanced tier. - Restart and validate
Close Command Prompt, restart your PC, and test for stability. Most users see improvement at this point.
Advanced sfc /scannow Repairs: Offline Mode and Manual Recovery
You've run sfc and DISM, but your system still won't stabilize or won't boot. This is rare, but when it happens, you need to take the repair offline, meaning you boot into Windows Recovery Environment (WinRE) and scan the Windows installation from outside the running OS. This bypasses file locks and allows sfc to access and repair files that are in use during normal boot.
Alternatively, if sfc identifies specific files it cannot repair, you can manually replace them. This requires finding a clean copy of the corrupted file from another working machine with the same Windows version, then replacing the damaged one. It's surgical, but it works when everything else fails.
Run sfc /scannow Offline from Windows Recovery Advanced
- Boot into Windows Recovery Environment (WinRE)
If Windows won't boot normally, interrupt the boot process by powering off during startup three times in a row. On the fourth startup, Windows will enter recovery. Alternatively, insert Windows installation media and boot from it, then select 'Repair your computer' from the setup screen.
On the 'Choose an option' screen, click Troubleshoot > Advanced options > Command Prompt. - Identify the Windows drive letter in recovery mode
In WinRE, drive letters often shift. Your Windows installation might not be C:. To check, type:diskpart
Then type:list volume
This shows all volumes and their assigned letters. Look for the one labeled with your Windows partition size. Note the letter (usually C:, but verify). - Exit diskpart and run offline sfc
Type:exit
Now run sfc against the offline Windows installation:sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
Replace C: with the correct drive letter if needed. The double backslashes are required in the command prompt. - Wait for completion
This scan verifies and repairs files in your Windows installation without running it. It takes longer than online sfc but is more thorough. You'll see the same 100% completion and result messages. - Exit recovery and restart normally
Type:exit
Click 'Continue' to restart into Windows. If repairs were successful, Windows should boot and run normally now. - Validate from normal Windows boot
Once Windows is running, open elevated Command Prompt again and runsfc /scannowone more time to confirm no remaining integrity violations. This ensures offline repairs stuck and nothing else degraded during normal boot.
Manually Replace Corrupted System Files Advanced
- Find which files cannot be repaired
sfc logs detailed results in%windir%\Logs\CBS\CBS.log. Open File Explorer, paste that path into the address bar (replacing %windir% with C:\Windows if needed), and open CBS.log with Notepad. Search for 'Cannot repair' to find specific file paths that sfc couldn't fix. - Take ownership of the corrupted file
Open elevated Command Prompt and type:takeown /f C:\Windows\System32\filename.dll
Replace filename.dll with the actual corrupted file path from CBS.log. Press Enter. - Grant Administrators full permissions
Type:icacls C:\Windows\System32\filename.dll /grant administrators:F
Again, use the correct file path. This gives you write access. - Obtain a clean copy of the file
Get the file from another computer running the exact same Windows version (same build number). You can check your build in Settings > System > About. Copy the clean file to a USB drive. - Replace the corrupted file
In elevated Command Prompt, type:copy D:\filename.dll C:\Windows\System32\filename.dll
Replace D: with your USB drive letter and use the correct file path and name. Press Y when prompted to overwrite. - Rerun sfc /scannow to verify
After replacing the file, runsfc /scannowagain to confirm no integrity violations remain for that file.
When to Use System Restore or Reset This PC
If sfc /scannow, DISM, offline repair, and manual file replacement all fail, Windows itself may be too damaged to repair surgically. At this point, your options narrow. You can attempt an in-place upgrade repair: boot from current Windows installation media and select 'Repair your computer' from setup. This reinstalls Windows components while preserving your files and installed applications.
If even that doesn't work, you're looking at Settings > System > Recovery > Reset this PC. Choose 'Keep my files' if you want to preserve documents and media, or 'Remove everything' for a full clean slate. This nuclear option works because it bypasses the corrupted component store entirely and writes fresh Windows from scratch.
Before you go there, also consider whether the corruption is actually filesystem-level. Run chkdsk C: /F /R in elevated Command Prompt (with /F to fix errors and /R to locate bad sectors). Schedule it to run at next boot if the drive is in use. Bad sectors can't be fixed, but chkdsk can mark them as unusable so Windows avoids them. If your drive is failing, you'll see this confirmed in SMART status (use CrystalDiskInfo to check).
Understanding sfc /scannow Logs and Diagnostics
sfc doesn't just run silently. Every scan, every repair, every failure gets logged to CBS.log. This file is buried in %windir%\Logs\CBS\CBS.log, but it's goldmine information if you want to know exactly what happened.
Open it with Notepad (it's a plain text file). Search for 'Repairing' to see what sfc fixed. Search for 'Cannot repair' to see what it couldn't touch. Each entry includes a timestamp, file path, and reason for the failure. If a file couldn't be repaired because the source copy in WinSxS is also corrupted, that's your signal to run DISM first.
For more granular diagnostics, run these DISM health checks before you repair:
DISM.exe /Online /Cleanup-image /CheckHealthQuick check, tells you if corruption existsDISM.exe /Online /Cleanup-image /ScanHealthDetailed scan, identifies specific corrupted components
Neither of these repairs anything; they just report. But they're useful if you're troubleshooting a persistent problem and want to understand whether the component store is actually the culprit.
If sfc /scannow and DISM have run but your system still crashes or refuses to boot, we can take this offline and diagnose the exact corrupted files. Remote support typically resolves persistent file corruption in 30, 45 minutes.
Get remote helpPreventing sfc /scannow Issues Going Forward
Once you've fixed corruption once, you don't want to do it again. Prevention is faster than repair.
Keep Windows fully updated. Run Windows Update monthly and let it finish without interruption. Updates patch file corruption vulnerabilities before they become problems. Before running DISM or sfc, install all pending updates first.
Don't skip the restart. When Windows asks you to restart after an update, do it. Delaying restarts leaves servicing operations incomplete, which corrupts the component store. Set updates to install during off-hours if you need to avoid downtime.
Protect your power supply. Install a UPS (uninterruptible power supply) on your desktop. Sudden power loss mid-update is one of the fastest ways to corrupt system files. Laptops with good batteries are safer; desktops without a UPS are vulnerable.
Monitor disk health. Use CrystalDiskInfo or Hard Disk Sentinel to check your drive's SMART status monthly. Failing drives introduce bit rot that corrupts any file, including system files. Catch a dying drive before it kills Windows.
Run periodic chkdsk checks. Schedule a full check with chkdsk C: /F /R every few months. This catches filesystem errors before they cascade into sfc alerts.
Avoid system tweakers. Don't use any third-party 'optimizer' or 'cleaner' that promises to improve Windows performance by modifying system files or removing 'junk'. They don't understand what they're deleting, and 'cleanup' usually means corruption. Microsoft's built-in Disk Cleanup and Storage Sense are safe; anything else is a gamble.
Use reliable antivirus. Malware modifying system files is a real risk. AV-TEST independent benchmarks rank the most effective antivirus tools. Windows Defender (built-in) is solid for most users, but if you want extra layers, Kaspersky and Bitdefender consistently score highest in real-world protection tests.
Create System Restore points regularly. Windows creates these automatically, but you can manually create one before making system changes. If something goes wrong, you can roll back to the last known-good state. This won't help with file corruption already present, but it can undo failed tweaks that cause corruption in the first place.
Back up your system image. Use File History or third-party tools like Macrium Reflect to back up your entire drive. If corruption is severe and unfixable, you can restore from a clean backup image and avoid the nuclear 'Reset this PC' option.
sfc /scannow System File Checker Summary
sfc /scannow is your first line of defence against Windows system file corruption. It's free, built-in, and solves most stability issues caused by damaged system files. Run it when your PC crashes randomly, refuses to boot, or throws resource errors.
Start with the quick fix: elevated Command Prompt, type sfc /scannow, wait for results, restart. If sfc reports success, you're done. If it reports files it cannot repair, run DISM /RestoreHealth first (repairs the component store), then rerun sfc /scannow. That two-step process catches 90% of corruption issues.
For the stubborn 10%, boot into Windows Recovery Environment and run sfc offline, or manually replace specific corrupted files after taking ownership. These advanced moves require more patience, but they work when standard sfc approaches fail.
Keep Windows updated, protect your power supply, monitor disk health, and avoid system tweakers. These prevention steps cost nothing and save you from needing sfc /scannow repairs in the first place. But when corruption does strike, you now know exactly how to fix it.


