System command

sfc command

Scan protected Windows system files and repair supported issues.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

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

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example usage for sfc.

sfc /verifyonly

Parameters, options and clauses

Option / clauseDescription
/scannowScan all protected system files and repair issues when possible.
/verifyonlyScan protected files without making repairs.
/scanfile=<file>Scan the specified full path and attempt repairs.
/verifyfile=<file>Verify the specified full path without repairs.
/offwindir=<directory>Set the offline Windows directory for repair.
/offbootdir=<directory>Set the offline boot directory for repair.
/offlogfile=<path>Write the offline repair log to the specified location.
/?Display command help.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory