Short for System File Checker, SFC is a command that scans and replaces any Microsoft Windows file with the correct version. The sfc command is excellent when you run into an issue that is difficult to troubleshoot.

Availability

Sfc command is an external command available for the following Microsoft operating systems as sfc.exe.

  • Availability

  • Sfc syntax

  • Sfc examples

  • Windows 2000

  • Windows XP

  • Windows Vista

  • Windows 7

  • Windows 8

  • Windows 10

Sfc syntax

Windows 10 and 11 syntax

SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=] [/VERIFYFILE=] [/OFFWINDIR= /OFFBOOTDIR= [/OFFLOGFILE= ]]

Windows Vista, 7, and 8 syntax

SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=] [/VERIFYFILE=] [/OFFWINDIR= /OFFBOOTDIR=]

Windows XP syntax

SFC [/SCANNOW] [/SCANONCE] [/SCANBOOT] [/REVERT] [/PURGECACHE] [/CACHESIZE=x]

Windows 2000 syntax

SFC [/SCANNOW] [/SCANONCE] [/SCANBOOT] [/CANCEL] [/ENABLE] [/PURGECACHE] [/CACHE SIZE=x] [/QUIET]

Sfc examples

sfc /scannow

Begins the scan of all system files.

  • Windows 10 and 11 syntax.
  • Windows Vista, 7, and 8 syntax.
  • Windows XP syntax.
  • Windows 2000 syntax.

In Windows Vista, Windows 7, Windows 8, Windows 10, and Windows 11, you must be running in an elevated command mode for the SFC command to work correctly. Otherwise, you receive the “You must be an administrator running a console session to use the sfc utility” error when you attempt to run any of the following examples.

sfc /VERIFYFILE=c:\windows\system32\kernel32.dll

Check the kernel32.dll file for any problems. If no problems are found with the file scanned, a “Windows resource protection did not find any integrity violations” message appears after a few seconds.