System File Checker (SFC) is a built-in Windows tool that will scan and repair system files in your Windows. It does this by comparing your system with a cached copy stored in your OS. If it detects any inconsistencies caused by corrupted and missing files, then it will automatically repair and restore the system files.
A guide to repairing corrupted system files in Windows 11 using System File Checker (SFC)
There are several ways you can run an SFC scan, depending on your needs. This guide shows you how to do it through Command Prompt, Windows Recovery Environment (WinRE), and Windows PowerShell.
Before you dive in, here are a few prerequisites:
- Make sure you have administrative privileges for the computer you’re troubleshooting.
To check:- Open the Start Menu > Settings > Accounts.
- If you have administrator privileges, the word “Administrator” should be printed under your username.
- The device should not be in Safe Mode unless you are troubleshooting advanced errors. If it is in safe mode, follow these steps to turn it off:
- Press Win+R, type msconfig, and press Enter.
- Go to the Boot tab, uncheck Safe boot, and select Apply > OK.
- A prompt box will open. Select Restart.
- It would be best to be connected to the Internet while doing these repairs if you need to perform supplemental DISM repairs.
Method 1: Run System File Checker (SFC) via Command Prompt
- Open the Start Menu, search for Command Prompt, and open it.
- Right-click on Command Prompt > Run as administrator.
- Type sfc /scannow and press Enter. This will run the SFC scan, which usually takes around 5-10 minutes. However, it can run for longer, depending on your computer and if problems are found during the scan.
- After the scan, here are some of the common results you might see:
-
- “Windows Resource Protection did not find any integrity violations” – No issues have been found.
- “Windows Resource Protection found corrupt files and repaired them” – Issues were found, and they were repaired.
- “Windows Resource Protection found corrupt files but was unable to fix some of them” – Issues were found, and the SFC scan was unable to fix them.
- In this case, run DISM.
Method 2: Run System File Checker (SFC) in WinRE
If the system is inaccessible, use WinRE.
- Open the Start Menu > Settings > System > Recovery.
- Scroll down to Advanced Startup under Recovery Options, and select Restart now. This will restart your computer into WinRE.
- Select Troubleshoot > Advanced Options > Command Prompt.
- Type sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows and press Enter.
Please note that the driver letter in D:\Windows should be replaced with the actual drive where your Windows folder is located. This is usually in drive C:\ or drive D:\ but this can vary, depending on your system.
Method 3: Run System File Checker (SFC) via PowerShell
Windows PowerShell can run the same SFC scan that Command Prompt can, and it is the preferred program for remote scripting and enterprise environments.
- Open the Start Menu and search for Windows PowerShell.
- Right-click on Windows PowerShell > Run as administrator.
- Type sfc /scannow and press Enter. This will run the SFC scan, which usually takes around 5-10 minutes. However, it can run for longer, depending on your computer and if problems are found during the scan.
- After the scan, here are some of the common results you might see:
-
- “Windows Resource Protection did not find any integrity violations” – No issues have been found.
- “Windows Resource Protection found corrupt files and repaired them” – Issues were found, and they were repaired.
- “Windows Resource Protection found corrupt files but was unable to fix some of them” – Issues were found, and the SFC scan was unable to fix them.
- In this case, run DISM.
Recommended: Run DISM before System File Checker (SFC)
Deployment Image Servicing and Management (DISM.exe) is a built-in Windows tool that allows you to perform various tasks on Windows, such as mounting and unmounting images, adding and removing drivers, applying updates, enabling features, and so much more.
If running sfc /scannow cannot repair the corrupt files, consider running DISM first. This will restore the component store.
- Open Windows PowerShell or Command Prompt as an administrator, depending on your preferences.
- Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter.
- This will run DISM. Once complete, use Command Prompt or PowerShell to rerun sfc /scannow.
Important pointers for repairing system files using SFC and DISM
- Whenever you run an SFC scan, it logs its activity, which you can find at SFC writes to %windir%\Logs\CBS\CBS.log. Use findstr to filter the relevant lines and help you figure out the source of the issue.Here are the steps to do that:
- Go to the Start Menu, search for Command Prompt, and open the program.
- Type findstr /c:”[desired_keyword]” %windir%\Logs\CBS\CBS.log > “%userprofile%\Desktop\SFCDetails.txt” and press Enter.
- This will create a text file of your logs and save it on your desktop.
- DISM repairs the source files used by SFC. If DISM fails, consider mounting an ISO or using a local repair source.
- Consider scheduling monthly SFC scans, especially for devices prone to user configuration errors.
Why use System File Checker (SFC)?
SFC can resolve system instability caused by file corruption and fix issues with missing or misbehaving Windows components automatically. This tool can also restore system integrity without having to do a full Windows reinstall by diagnosing issues and updating problematic drivers as it scans your system files.
Restore and repair your system files through SFC
System File Checker (SFC) is an essential diagnostic and repair tool in Windows 11. And, especially when combined with the DISM tool, IT professionals and administrators can detect and repair system-level file integrity issues to maintain endpoint reliability.
You can run SFC with the sfc /scannow command, which can be run through Command Prompt and Windows PowerShell. If the computer fails to boot, you can also use WinRE to access Command Prompt.
If the SFC scan fails, you can run DISM first before running the SFC scan again. And if you’re working with enterprise-level diagnostics, run Windows PowerShell for a smoother and optimized process.