SFC Command to Repair Corrupted System Files in Windows 11

Let’s discuss SFC Command to Repair Corrupted System Files in Windows 11. The SFC stands for System File Checker. The SFC command is the abbreviation of System File Checker.

The System File Checker can scan Windows and restore your files when some Windows functions are not working or crash. This is also a part of Windows Resource Protection since Windows Vista. It refers to Windows Resource Checker’s previous operating systems rarely.

In our previous operating systems, like Windows XP and Windows 2000, the SFC tool is a part of the Windows File Protection System. The SFC command can generally verify and replace corrupted Windows system files.

The SFC command is useful when issues are suspected with Windows-protected files. This post describes the details of the SFC command and the step-by-step operation defined in it.

Patch My PC
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.1
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.1

What is SFC Command?

The SFC command scans and verifies the integrity of all protected system files and replaces incorrect versions with correct versions. If this command discovers that a protected file has been overwritten, it retrieves the correct version of the file from the systemroot\ folder and then replaces the incorrect file.

  • System File Checker allows an administrator to scan all protected files to verify their versions.
  • Suppose System File Checker discovers that a protected file has been overwritten.
  • In that case, it retrieves the correct version of the file from the cache folder (%Systemroot%\System32\Dllcache)
  • The Windows installation source files and then replaces the incorrect file.
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.2
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.2

System File Checker also checks and repopulates the cache folder. It would be best if you were logged on as an administrator or a member of the Administrators group to run System File Checker. If the cache folder becomes damaged or unusable, you can use the following commands to repair its contents.

  • SFC/scannow
  • SFC/scanonce
  • SFC/scanboot

The parameters of the SFC command and the descriptions are narrated in the table below; each has its functionalities. In the table, the properties of the commands are described.

ParametersDescriptions
/scannowScans the integrity of all protected system files and repairs files with problems when possible.
/verifyonlyScans the integrity of the specified file (full path and filename) and attempts to repair any problems if they’re detected.
/scanfile <file>Scans the integrity of the specified file (full path and filename) and attempts to repair any problems if they’re detected.
/verifyfile <file>Verifies the integrity of the specified file (full path and filename), without performing repairs.
/offwindir <offline windows directory>Specifies the location of the offline windows directory, for offline repair.
/offbootdir <offline boot directory>Specifies the location of the offline boot directory for offline repair.
/offlogfile=<log file path>Specifies a location to store the log file other than the default.
/?Displays help at the command prompt.
SFC Command to Repair Corrupted System Files in Windows 11 -Table.1

How to Run SFC Command in Elevated Command Prompt

You can open the elevated command prompt to run the SFC command (system file checker). The Administrative command prompt shows C:\Windows\System32>; type SFC /? and hit enter to run the command in the command prompt.

Adaptiva
  • After you hit enter, it shows the message at first as “Microsoft (R) Windows (R) Resource Checker Version 6.0. Copyright (C) Microsoft Corporation. All rights reserved.”
  • The second line shows the message: “Scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions.”
  • It also shows the syntax for the SFC (system file checker) command line. The syntax and the SFC command processing image are presented below for reference.

Syntax: sfc [/scannow] [/verifyonly] [/scanfile=<file>] [/verifyfile=<file>] [/offwindir=<offline windows directory> /offbootdir=<offline boot directory> /offlogfile=<log file path>]

SFC Command to Repair Corrupted System Files in Windows 11 -Fig.3
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.3

NOTE! Do not close this Command Prompt window until the verification is 100% complete. The scan results will be shown after this process is finished.

SFC /scannow Command

The SFC /scannow command work to scan all protected system files immediately and replaces incorrect versions with correct Microsoft versions. This command may require access to the Windows installation source files.

To perform, type SFC /scannow and hit Enter; it takes some time to verify your system. After that, the result appears as shown in the image below.

SFC Command to Repair Corrupted System Files in Windows 11 -Fig.4
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.4

SFC /verifyonly Command

The SFC /verifyonly command, its work is to scans the integrity of the specified file (full path and filename) and attempts to repair any problems if they’re detected. To perform, type SFC/verifyonly and hit enter; it takes some time to verify your system. After that, the result appears as shown in the image below.

  • If any violation does not appear, the message is “Windows Resource Protection did not find any integrity violations, ” meaning you do not have any missing or corrupted system files.
  • If any violation appears, the message is “Windows Resource Protection found integrity violation. Details are included in the CBS log file located at windir\Logs\CBS\CBS.log”
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.5
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.5

Some other parameters are available, such as discussed below, to perform the /scannow command. The parameters are discussed one by one for better understanding. The syntax for such commands is provided here.

Syntax: Sfc [/Scannow] [/Scanonce] [/Scanboot] [/Revert] [/Purgecache] [/Cachesize=x]

SFC /Scannow

The SFC /scannow command immediately scans all protected system files and replaces incorrect versions with correct Microsoft versions. This command may require access to the Windows installation source files. Please refer to Fig.4 above, which is discussed in detail.

SFC /Scanonce

The SFC /scanonce works to scan all protected system files one time when you restart your computer. This command may require access to the Windows installation source files when you restart the computer.

SFC /Scanboot

The SFC /scanboot works to scan all protected system files every time you start your computer. This command may require access to the Windows installation source files every time you start your computer.

SFC /Revert

The SFC /revert returns the scan to the default setting (do not scan protected files when you start the computer). The default cache size is not reset when you run this command. This command is equivalent to the /Enable switch in Windows 2000.

SFC /Purgecache

The SFC /purgecache works to purge the file cache and scans all protected system files immediately. This command may require access to the Windows installation source files.

SFC /Cachesize=x

The SFC /cachesize=x sets the file cache size to x megabytes (MB). The default size of the cache is 50 MB. This command requires you to restart the computer and then run the /purgecache command to adjust the on-disk cache size.

Run System File Checker (SFC Command) in PowerShell

SFC Command is also used in the PowerShell Admin console to check and repair the corrupted files. You can execute all the commands with the same execution procedure done in the command prompt.

In PowerShell, follow the same procedure used in the command prompt to execute the System File Checker (SFC Command) commands.

SFC Command to Repair Corrupted System Files in Windows 11 -Fig.6
SFC Command to Repair Corrupted System Files in Windows 11 -Fig.6

The information on How to Repair Corrupted System Files in Windows 11 Using SFC Command is helpful. Please follow us on HTMD Community and visit our website HTMD Forum if you like our content.

Author

Alok is a Master of Computer Applications (MCA) graduate. He loves writing on Windows 11 and related technologies. He likes to share his knowledge, quick tips, and tricks with Windows 11 or Windows 10 with the community.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.