The One Command Every Windows User Should Know And How To Use It
Its function is simple. The tool scans all your Windows system files for issues. If a problem is found, it replaces the corrupted file with a fresh version from a compressed archive in your Windows directory. The thing is, despite the protections Microsoft has put in place, these files seem to easily get disrupted which can cause a laundry list of issues.
To run the system file checker, open an elevated Command Prompt (or PowerShell) window as an administrator. Then, type in “sfc /scannow” and wait as the tool does its thing. When the progress bar reaches completion, it will report back one of three statuses:
- “Windows Resource Protection did not find any integrity violations.”
- “Windows Resource Protection found corrupt files and successfully repaired them.”
- “Windows Resource Protection found corrupt files but was unable to fix some of them.”
If you receive the first message, either your computer has no issues related to system file corruption or the issue lies elsewhere. The second message is what most users should expect to see, particularly if they have never run this tool before or have not for a long time. While not always listed in the follow up steps, users should reboot their computer and see if their issue is resolved. More likely than not, it is.
The third result can be disheartening, but there is still hope. If I receive this outcome, I typically need to escalate to the Deployment Image Servicing and Management tool, or DISM for short. The name may be intimidating and even seem irrelevant to users who have not imaged their drives, but it essentially takes the system file checker’s game and goes pro. Instead of pulling files from a compressed archive, the DISM tool can pull clean file copies from installation media or even the internet.
Assuming you do not have Windows installation media lying around, the easiest approach is to leverage DISM’s online mode. Back in an elevated Command Prompt window, this time enter “DISM /online /cleanup-image /restorehealth” and hit enter. These switches tell the tool to scan the system for issues, fix them, and pull the necessary files from the Internet. DISM generally takes more time to run and is not worth using when the system file checker is otherwise able to do its thing.
There is a fourth result that can occur. In some cases, SFC will hang partway through and never complete. If your system is stuck at a certain percentage for several hours, it is probably a good idea to reboot and try it again. If it locks up again on the second go round, skip directly to DISM and hope for better results.
We would be remiss if we did not mention Check Disk as well. This command is likely more well-known and completes the trio with SFC and DISM. Unlike the others, Check Disk scans the file system itself in addition to searching for bad sectors. It does not resolve any issues with files themselves. Users can run Check Disk from an elevated command prompt by typing "chkdsk /f" which prompts the user to reboot. Type a "y" and submit to reboot immediately, or "n" to stave off the reboot for later. Personally, I have not had Check Disk find or resolve any issues in several years, but your mileage may vary. At the very least, Check Disk is something to try if the SFC is hanging at a certain percentage.
All three commands are legitimate free tools built right into Windows, so there is no reason not to use them as a frontline fix. In particular, SFC’s chance of finding and fixing issues is so high that I knew I could run it on my laptop to grab the screenshot of the second result posted above. I even run it on brand new systems following the installation of Windows updates because those have a surprising – or not so surprising – tendency of introducing the kinds of issues that SFC is made to fix.
Of course, any IT admin or computer repair technician should have a wide range of tools at their disposal, but SFC is one trick that every Windows user should know. In fact, you should probably run this on the Windows systems you have right now – maybe the outcome will brighten your day. What other tricks of the trade do you use that we should cover in future articles?