Here we’ll show you how to use the system file checker –  sfc /scannow to repair corruption within Windows 7, Windows 8 and higher.

sfc-scannow

Step 1. Open an Administrator Command Prompt

Step 2. Type in sfc /scannow

Type sfc /scannow

If any errors are found, run the command 2 more times as sometimes this is necessary.  The error message you will receive will be:

Windows Resource Protection Found Corrupt Files but was Unable to Fix Some of Them

Step 3. If errors persist

If there are still errors run:

Dism /Online /Cleanup-Image /RestoreHealth

Step 4. Type sfc /scannow again

Type sfc /scannow again

Step 5. Extract the System File Checker errors from the CBS.log

If there are still errors type:

findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

to extract the relevant errors and place them in a text file on your desktop

Step 6. Search for errors

Search for the specific errors online and repair

Eventually you want to see either one of the following messages:

  • Windows Resource Protection found corrupt files and successfully repaired them
  • Windows Resource Protection did not find any integrity violations