This tutorial will show you how to run the System File Checker (SFC) tool to repair missing, corrupted, and modified system files in Windows 10 and Windows 11.
System File Checker (SFC) is a tool built into Windows that will check for system file corruption.
The SFC /SCANNOW command scans and verifies the integrity of all protected system files and replaces missing or corrupted versions with correct versions when possible. If this command discovers that a protected file has been overwritten, it retrieves the correct version of the file from the Windows image component store, and then replaces the missing or corrupted file.
Reference:
Use the System File Checker tool to repair missing or corrupted system files - Microsoft Support

If you get a Windows Resource Protection Could Not Start the Repair Service error when trying to run SFC, make sure the Windows Modules Installer service is enabled and set to manual, and try again.
- Option One: Run SFC /SCANNOW command in Windows 11
- Option Two: Run SFC /SCANNOW command in Command Prompt at Boot
- Option Three: View SFC Scan Details from CBS.LOG
You must be signed in as an administrator to use this option.
1 Open an elevated Windows Terminal, and select Command Prompt or Windows PowerShell.
2 Copy and paste the
sfc /scannow
command into the elevated terminal, and press Enter. (see screenshot below)3 When the scan is complete, hopefully you will get a Windows Resource Protection did not find any integrity violations message indicating you do not have any missing or corrupted system files.
If you get a Windows Resource Protection found corrupt files but was unable to fix some of them. type message, then:
Run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow
command up to 3 times with Fast Startup turned off and restarting the computer after each time to completely fix everything it's able to.
If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the computer afterwards, and try running the sfc /scannow
command again.
If still not, then do a system restore using a restore point dated before the system file problem occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.
If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could upload and attach your sfcdetails.txt file created using OPTION THREE below in a reply post in this tutorial.
If still not, then you could do a repair install of Windows 11 without losing anything.
If still not, then you could reset Windows 11.
1 Open a command prompt at boot.
2 Copy and paste the
diskpart
command into the command prompt at boot, and press Enter. (see screenshot below)3 Copy and paste the
list volume
command into the command prompt at boot, and press Enter.4 Make note of the offline boot directory (ex: recovery partition around 500 MB) drive letter (ex: "E") and Windows 11 drive letter (ex: "C").
5 Copy and paste the
exit
command into the command prompt at boot, and press Enter to exit diskpart.6 Type the command below into the command prompt at boot, and press Enter.
sfc /scannow /offbootdir=<recovery partition drive letter>:\ /offwindir=<Windows drive letter>:\Windows
Substitute <recovery partition drive letter> in the command above with the offline boot directory (ex: recovery partition around 500 MB) drive letter (ex: "E") from step 4.
Substitute <Windows drive letter> in the command above with the Windows 11 drive letter (ex: "C") from step 4.
For example: sfc /scannow /offbootdir=E:\ /offwindir=C:\Windows
7 When the scan is complete, hopefully you will get a Windows Resource Protection did not find any integrity violations message indicating you do not have any missing or corrupted system files.
If you get a Windows Resource Protection found corrupt files but was unable to fix some of them. type message, then:
Run the command again to see if it may be able to the next time. Sometimes it may take running the sfc /scannow
command up to 3 times with Fast Startup turned off and restarting the computer after each time to completely fix everything it's able to.
If not, then run the Dism /Online /Cleanup-Image /RestoreHealth (requires Internet connection) command to repair any component store corruption, restart the computer afterwards, and try running the sfc /scannow
command again.
If still not, then do a system restore using a restore point dated before the system file problem occurred to fix it. You may need to repeat doing a system restore until you find a older restore point that may work.
If still not, and you would like to get help with your SFC issue before continuing with more drastic measure below, then you could upload and attach your sfcdetails.txt file created using OPTION THREE below in a reply post in this tutorial.
If still not, then you could do a repair install of Windows 11 without losing anything.
If still not, then you could reset Windows 11.
When SFC runs from within Windows, it logs its actions into the C:\Windows\Logs\CBS\CBS.log file with [SR] tags.
This option creates a sfcdetails.txt file on your desktop that shows you only the specific SFC details from the huge CBS.log.
SFC logging in the CBS.log file is not supported when running SFC at boot (offline) in Option Two.
1 Open Windows Terminal, and select Command Prompt or Windows PowerShell.
2 Copy and paste the appropriate command below into the terminal, and press Enter. (see screenshotd below)
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
(sls [SR] $env:windir\Logs\CBS\CBS.log -s).Line >"$env:userprofile\Desktop\sfcdetails.txt"
3 You can now close Windows Terminal if you like.
4 Open the sfcdetails.txt file created on your desktop to see only the SFC scan details from the CBS.log file.
The sfcdetails.txt file contains details from every time that the System File Checker tool has been run on the computer. The file includes information about files that were not repaired by the System File Checker tool. Verify the date and time entries to determine the problem files that were found the last time that you ran the System File Checker tool.
5 The sfcdetails.txt file uses the following format:
Date/Time SFC detail The following sample log file contains an entry for a file that could not be repaired: 2007-01-12 12:10:42, Info CSI 00000008 [SR] Cannot repair member file [l:34{17}]"Accessibility.dll" of Accessibility, Version = 6.0.6000.16386, pA = PROCESSOR_ARCHITECTURE_MSIL (8), Culture neutral, VersionScope neutral, PublicKeyToken = {l:8 b:b03f5f7f11d50a3a}, Type neutral, TypeName neutral, PublicKey neutral in the store, file is missing
That's it,
Shawn Brink