How to Run SFC Scan in Windows?

It often happens that some Windows system files become corrupted, creating gaps within the operating system and leading to various issues. Windows offers a unique tool that allows users to check for corrupted or missing system files and restore them to their previous states.

How to Run a System File Checker (SFC) Scan

  1. Open Command Prompt with admin rights:
    • For older Windows versions: Right-click the Start menu and choose Command Prompt (Admin) or press Win + X and select Command Prompt (Admin).
    • For Windows 10/11: Right-click the Start menu and choose Windows PowerShell (Admin). You can still access Command Prompt by searching for “cmd” in the Start menu, right-clicking it, and selecting Run as administrator.

  2. In Command Prompt, type the following command and press Enter to start the SFC scan:
    sfc /scannow

  3. Wait for the scan to finish. The results will be displayed afterward.

How This Command Scans Your PC

The System File Checker (SFC) is a tool by Windows that scans all protected system files. Here’s what it checks:

  • Libraries (*.dll files)
  • Executables (*.exe files)
  • System Settings
  • Other Critical Components

When a corrupted file is found, the SFC tool tries to replace it with a clean version.

Older Windows Versions: For versions like Windows XP, replacement files were stored in:

C:\Windows\System32\dllcache

In newer Windows versions, SFC uses the Windows Component Store located at:

C:\Windows\WinSxS

This store has all needed files to replace and repair corrupted system files.

After the scan, results will be displayed in the Command Prompt window. Possible outcomes are:

  • No integrity violations found: All system files are intact.
  • Corrupted files found and repaired: Some files were corrupted but have been replaced.
  • Corrupted files found but could not be repaired: SFC will log details of the files it couldn’t repair. Check the CBS log file located at
%WinDir%\Logs\CBS\CBS.log

To view the details, follow these steps:

  1. Open Command Prompt. Copy and paste this command and press Enter:
    findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt
  2. Next, to repair corrupt system components, copy the following command into Command Prompt and press Enter:
    Dism /Online /Cleanup-Image /RestoreHealth
  3. After the scan completes, locate the sfcdetails.txt file on your desktop. Open it to review the SFC scan results.

Additional Troubleshooting

If the SFC scan does not fix the issue, consider using SFCFix, a third-party tool that reads from the CBS.LOG file to repair corruptions. This utility simplifies fixing various corruption issues that the SFC command might not handle.

ABOUT THE AUTHOR

Kamil Anwar


Kamil is a certified MCITP, CCNA (W), CCNA (S) and a former British Computer Society Member with over 9 years of experience Configuring, Deploying and Managing Switches, Firewalls and Domain Controllers also an old-school still active on FreeNode.