The sfc command in Windows
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)
The sfc command is responsible for scanning and verifying the integrity of all protected system files.As well as replacing incorrect file system versions with more accurate versions.To better understand how to use this command, see the example below.
Sfc command syntax
sfc [/ scannow] [/ verifyonly] [/ scanfile =] [/ verifyfile =] [/ offwindir = / offbootdir =]
Sfc command parameter
Parameters
Describe
/ scannow
Fully scan all protected system files, and fix problem files when possible.
/ verifyonly
Full scan of all protected system files.However, no corrective actions will be taken.
/ scanfile
Full scan of specified files and fix files if problems are found when possible.
Specify the full path and file name
/ verifyfile
Verify the integrity of the specified file.There will be no repairs done here.
/ offwindir
Specify the location of the offline windows directory to serve the offline repair process.
/ offbootdir
Specify the location of the folder to start offline
/?
Show help at thecommand prompt.
Sfc command comment
You must be logged on as a member of the Administrators group to run the sfc .exe executable file.
If the sfc command detects that a protected file has been overwritten, it will retrieve the correct version of the file from the systemrootsystem32dllcache folder, then replace the file incorrectly.
There are functional differences between the sfc command on Windows Server 2003, Windows Server 2008 and Windows Server 2008 R2, to see what this difference is, refer to the following articles:
- For more information about the sfc command on Windows Server 2003, see article 310747 in the Microsoft Knowledge Base.
- For more information on sfc commands on Windows Server 2008 and Windows Server 2008 R2, see the article about System File Checker.
Example sfc command
To verify kernel32.dll, type:
sfc /verifyfile=c:windowssystem32kernel32.dll
To set up offline repair for kernel32.dll file with the offline boot directory set to d: and the offline windows directory set to d: windows, type:
sfc /scanfile=d:windowssystem32kernel32.dll / offbootdir = d: / offwindir = d: windows
See more:
- RPC Server error is Unavailable in Windows Server 2008 R2
- Table summarizes the basic PowerShell commands
- Instructions for installing Windows Server 2012 step by step
- Install Windows Server 2008
You should read it
- Del command in Windows
- Rem command in Windows
- Set command in Windows
- Cmd command in Windows
- Command at in Windows
- Fc command in Windows
- The echo command in Windows
- Bitsadmin getdisplayname and bitsadmin geterror command in Windows
- The command reg add in Windows
- Reg command copy in Windows
- Doskey command in Windows
- Exit command in Windows
Maybe you are interested
How to fix the missing language bar error on Windows 11 extremely quickly
Turn off these visual effects to make Windows run smoother!
7 Ways to Customize Windows 11 Notepad
8 settings to change to make your Mac trackpad and keyboard work like Windows
How to add fonts to Word in Windows computer
How to use the file search command on Windows, find saved files