How to Check for Corrupted Files in Windows 11
In this article
This guide shows you how to find and fix corrupted system files in Windows 11 using built-in tools. You'll learn to run the System File Checker (SFC) and Deployment Imaging Service and Management Tool (DISM), which scan your system and repair damaged files. No extra software is needed, but you should back up important data before making system changes.
What You'll Need
- A Windows 11 PC with administrative access
- Stable internet connection (for DISM to download repair files)
- At least 15–20 minutes of free time (scans can take a while)
- Optional: a backup of your important files
Step-by-Step
- Open Command Prompt as Administrator. Click the Start button, type
cmd(or “Command Prompt”), right-click the result, and select Run as administrator. If prompted by User Account Control, click Yes. - Run the DISM scan first. In the Command Prompt window, type the following command and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
This checks the Windows image for corruption and repairs it using Windows Update. It can take 10–20 minutes. Do not close the window while it's running. - Wait for DISM to finish. You'll see a progress bar and a message like “The restore operation completed successfully.” If it says “Error 87” or similar, check your internet connection and try again.
- Run the System File Checker. After DISM completes, type the following command and press Enter:
sfc /scannow
This scans all protected system files and replaces corrupted ones with cached copies. It can take 15–20 minutes. - Review the results. When SFC finishes, you'll see one of these messages:
- “Windows Resource Protection did not find any integrity violations.” – No corrupted files found.
- “Windows Resource Protection found corrupt files and successfully repaired them.” – Corrupted files were fixed.
- “Windows Resource Protection found corrupt files but was unable to fix some of them.” – Some files remain corrupted; see Troubleshooting below.
- Restart your computer. After the scans complete, restart your PC to apply any repairs.
- Check the CBS log if needed. If SFC couldn't fix everything, you can view the log file at
C:\Windows\Logs\CBS\CBS.logto see which files are corrupted. Open it with Notepad and look for lines containing “Cannot repair”.
Common Mistakes
- Running SFC without admin rights. If you don't open Command Prompt as administrator, you'll get an error saying you must be an administrator.
- Skipping DISM. Running SFC first often fails if the Windows image itself is corrupted. Always run DISM first.
- Closing the window early. Interrupting the scan can leave your system in an inconsistent state. Let it finish.
- Using third-party “repair” tools. Many are unnecessary and can cause more harm. Stick with built-in tools.
- Ignoring restart. Some repairs only take effect after a reboot.
Tips
- Run scans in Safe Mode if normal mode fails. Boot into Safe Mode (Settings > System > Recovery > Advanced Startup) and run the commands there to avoid interference from third-party software.
- Use Windows Update after repairs. Installing the latest updates can replace corrupted files with fresh versions.
- Create a restore point before scanning. Go to Control Panel > System > System Protection and create a restore point so you can revert if something goes wrong.
- Schedule regular scans. You can create a Task Scheduler task to run SFC weekly, but it's not necessary for most users.
- Check disk errors too. Run
chkdsk /fin an admin Command Prompt to fix hard drive issues that might cause corruption.
Troubleshooting
SFC says it can't fix some files. Run DISM again with the /Source option pointing to a Windows installation media. Insert a USB or DVD with Windows 11, note the drive letter (e.g., E:), then run:DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\sources\install.wim
If that doesn't work, try the repair-windows option in Settings > System > Recovery > Advanced startup.
DISM fails with error 0x800f081f. This usually means the source files are unavailable. Check your internet connection and Windows Update service (type services.msc in Run, ensure “Windows Update” is running).
Scans hang or take forever. Be patient; they can take 20+ minutes. If it's stuck for over an hour, close the window, restart, and try again in Safe Mode.
Corruption persists after repairs. This could indicate a failing hard drive. Run chkdsk /f and check the drive's health using tools like CrystalDiskInfo (third-party) or the built-in “Optimize Drives” tool.
You get “Access is denied” errors. Make sure you're running as administrator and that your antivirus isn't blocking the commands. Temporarily disable third-party antivirus, run the scans, then re-enable it.
Frequently Asked Questions
What does SFC actually do?
SFC (System File Checker) scans protected system files and replaces any that are corrupted or modified with the correct Microsoft versions from a cached folder.
Why do I need to run DISM before SFC?
DISM repairs the Windows system image that SFC relies on. If the image is damaged, SFC may fail or report errors it can't fix. Running DISM first ensures a healthy foundation.
How long do the scans take?
DISM typically takes 10–20 minutes, and SFC takes 15–20 minutes, depending on your hardware and the extent of corruption.
Will these scans delete my personal files?
No. SFC and DISM only repair Windows system files. Your documents, photos, and other personal data are not touched.
Can I use Windows PowerShell instead of Command Prompt?
Yes. Open PowerShell as administrator and run the same commands. The results are identical.
What if the corruption is caused by a virus?
Run a full antivirus scan before repairing. If malware has modified system files, SFC may restore them but the virus could re-corrupt them. Use Windows Defender offline scan or a reputable third-party scanner.