The System File Checker (SFC) is a preinstalled Command Prompt tool in Windows that attempts to repair corrupted system files by replacing them with redundant files. SFC is a mechanism of the Windows File Protection feature.
The SFC tool comes with several switches that perform different functions.
SFC Switches
The
table below lists all the switches which can be used with the SFC command-line
tool and their functions:
Commands | Function |
sfc /scannow | Scan for issues. If found, replace the file from the DLL cache. |
sfc /scanonce | Will scan only once. |
sfc /scanboot | Will scan the computer at every boot. |
sfc /revert | Revert the scanning functionality to its original (default) state. |
sfc /purgecache | Will remove the Windows File Protection cache and begin a scan over the system files. |
sfc /cachesize=X | Set the cache size of the Windows File Protection to X MBs. |
sfc /? | Display help regarding switches. |
The simplest (and most convenient) method to run an SFC scan is by running the following cmdlet in an elevated Command Prompt:
sfc /scannow
The cmdlet will then perform its job and attempt to repair any protected system files that may have been corrupted.