sfc
Scans and verifies the integrity of all protected system files and replaces incorrect versions with correct versions. Windows commands reference
On Windows File sfc.exe
Windows
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. IMPORTANT: You must be logged on as a member of the Administrators group to run this command.
sfc [/scannow] [/verifyonly] [/scanfile=<file>] [/verifyfile=<file>] [/offwindir=<offline windows directory> /offbootdir=<offline boot directory> /offlogfile=<log file path>]
To verify the kernel32.dll file, type
sfc /verifyfile=c:\windows\system32\kernel32.dllIdentify/verifyfileVerifies the integrity of the specified file (full path and filename), without performing repairs. Windows commands referenceTo set up the offline repair of the kernel32.dll file with an offline boot directory set to D: and an offline windows directory set to D:\Windows, type
sfc /scanfile=D:\windows\system32\kernel32.dll /offbootdir=D:\ /offwindir=d:\windowsIdentify/scanfileScans the integrity of the specified file (full path and filename) and attempts to repair any problems if they're detected. Windows commands reference/offbootdirSpecifies the location of the offline boot directory for offline repair. Windows commands reference/offwindirSpecifies the location of the offline windows directory, for offline repair. Windows commands reference/scannowScans the integrity of all protected system files and repairs files with problems when possible./verifyonlyScans the integrity of all protected system files, without performing repairs./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.Windows
Scan the integrity of Windows system files.
Scan all system files and, if possible, repair any problems
sfc /scannowIdentify/scannowScans the integrity of all protected system files and repairs files with problems when possible. Windows commands referenceScan all system files without attempting to repair any
sfc /verifyonlyIdentify/verifyonlyScans the integrity of all protected system files, without performing repairs. Windows commands referenceScan a specific file and, if possible, repair any problems
sfc /scanfile=path\to\fileIdentify/scanfileScans the integrity of the specified file (full path and filename) and attempts to repair any problems if they're detected. Windows commands referenceScan a specific file without attempting to repair it
sfc /verifyfile=path\to\fileIdentify/verifyfileVerifies the integrity of the specified file (full path and filename), without performing repairs. Windows commands referenceWhen repairing offline, specify the boot directory
sfc /offbootdir=path\to\directoryIdentify/offbootdirSpecifies the location of the offline boot directory for offline repair. Windows commands referenceWhen repairing offline, specify the Windows directory
sfc /offwindir=path\to\directoryIdentify/offwindirSpecifies the location of the offline windows directory, for offline repair. Windows commands referenceDisplay help
sfcIdentify