Skip to main content

Command referencesfc

sfc command (Windows / CMD)

WindowsCMDsystemintermediate

What it does

Verify protected Windows system files and repair supported corruption. Searches for the sfc command cmd system files usually need CMD syntax, practical switches, and notes on how it compares with PowerShell or Linux alternatives. This page covers syntax, common options, and copyable examples for Command Prompt.

Verify protected Windows system files and repair supported corruption.

Syntax

sfc [/SCANNOW] [/VERIFYONLY] [/SCANFILE=file] [/VERIFYFILE=file] [/OFFWINDIR=dir /OFFBOOTDIR=dir]

Common options

Flag / optionMeaning
/SCANNOWScan and repair protected system files.
/VERIFYONLYScan without repairs.
/SCANFILE=fileScan and repair one protected file.
/VERIFYFILE=fileVerify one file without repair.

Practical examples

Repair scan

sfc /scannow

Scans and repairs supported corruption as administrator.

Verify only

sfc /verifyonly

Checks protected files without changes.

Offline scan

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

Scans an offline Windows installation.

Common mistakes

  • Running repair operations without an elevated Command Prompt.
  • Interrupting a scan because progress appears paused.

FAQ

What does sfc do in Command Prompt?

Verify protected Windows system files and repair supported corruption.

How do I run sfc in CMD?

Open Command Prompt and follow `sfc [/SCANNOW] [/VERIFYONLY] [/SCANFILE=file] [/VERIFYFILE=file] [/OFFWINDIR=dir /OFFBOOTDIR=dir]`; quote paths containing spaces.

What is a practical sfc example in CMD?

Try `sfc /scannow` — Scans and repairs supported corruption as administrator.

Can sfc be used in a batch file?

Yes. Check its exit code and escape CMD metacharacters when input is variable.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.