The following commands are like a cheat sheet of essential Windows repair commands.
DO NOT USE THESE UNLESS YOU KNOW WHAT YOU ARE DOING.
RESEARCH EVERY ONE OF THESE COMMANDS BEFORE EXECUTING.
BACK UP YOUR SYSTEM PROPERLY.
| Command | Purpose |
| sfc /scannow | Scans and Repairs corrupted or missing system files with the System File Checker (see notes below) |
| DISM /Online /Cleanup-Image /RestoreHealth | Repairs Windows image and recovery files (used if sfc fails) using the Deployment Imaging Service and Management Tool (see notes below) |
| chkdsk C: /f /r | Checks the C: drive for errors, bad sectors, and fixes them |
| del %windir\\SoftwareDistribution\*.* /s /q | Deletes corrupted Windows Update cache files |
| net stop wuauserv | Stops the Windows Update service |
| net start wuauserv | Restarts the Windows Update service |
| net stop bits | Stops the Background Intelligent Transfer Service |
| net start bits | Restarts the BITS service for updates |
How to Run sfc /scannow in Windows
- Open Command Prompt as Administrator:
- Press
Windows + Sand typecmd. - Right-click Command Prompt and select Run as administrator.
- Press
- Run the Command:
- In the terminal, type:
sfc /scannow - Press
Enter.
- In the terminal, type:
- Wait for the Scan to Complete:
- This may take 10–30 minutes depending on your system.
- Do not close the window while the scan is running.
What the Results Mean
After completion, you’ll get one of the following messages:
- “Windows Resource Protection did not find any integrity violations.”
- Everything is fine—no corrupted files found.
- “Windows Resource Protection found corrupt files and successfully repaired them.”
- Some issues were found and fixed.
- “Windows Resource Protection found corrupt files but was unable to fix some of them.”
- Some files are still corrupted.
- You may need to:
- Run
sfc /scannowagain. - Use
DISM(Deployment Imaging Service and Management Tool) to repair the image: swiftCopyEditDISM /Online /Cleanup-Image /RestoreHealth - Then rerun
sfc /scannow.
- Run
- “There is a system repair pending which requires reboot to complete.”
- Restart your computer and run the command again.
Optional: View the SFC Scan Log
If repairs were made or failed:
- The log is saved at: bashCopyEdit
C:\Windows\Logs\CBS\CBS.log - Open it in a text editor and search for “[SR]” to find SFC-related entries.
The DISM /Online /Cleanup-Image /RestoreHealth command is used in Windows to repair the system image that Windows uses to service system files—particularly when sfc /scannow fails to fix corrupted files.
What DISM Does
DISM stands for Deployment Imaging Service and Management Tool.
It checks and repairs the Windows component store, which sfc depends on for restoring files.
Command Breakdown
DISM /Online /Cleanup-Image /RestoreHealth
/Online: Targets the running operating system (not an offline image)./Cleanup-Image: Initiates servicing or cleanup operations on the image./RestoreHealth: Scans the image for corruption and attempts to repair it using Windows Update or a specified source.
When to Use It
- If
sfc /scannowreports problems but can’t fix them. - If system components are broken or updates are failing.
- As a precursor to re-running
sfc.
Steps to Run It
- Open Command Prompt as Administrator.
- Enter: swiftCopyEdit
DISM /Online /Cleanup-Image /RestoreHealth - Press Enter and wait. This may take 15–30+ minutes depending on your system and internet.
After DISM Completes
Once DISM completes:
- Restart your PC.
- Run
sfc /scannowagain to fix any remaining issues.
Comments are welcomed below from registered users. You can also leave comments at our Discord server.
If you would like to see more content and articles like this, please support us by clicking the patron link where you will receive free bonus access to courses and more, or simply buying us a cup of coffee!
