Windows Essential Repair Commands

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.

CommandPurpose
sfc /scannowScans and Repairs corrupted or missing system files with the System File Checker (see notes below)
DISM /Online /Cleanup-Image /RestoreHealthRepairs Windows image and recovery files (used if sfc fails) using the Deployment Imaging Service and Management Tool (see notes below)
chkdsk C: /f /rChecks the C: drive for errors, bad sectors, and fixes them
del %windir\\SoftwareDistribution\*.* /s /qDeletes corrupted Windows Update cache files
net stop wuauservStops the Windows Update service
net start wuauservRestarts the Windows Update service
net stop bitsStops the Background Intelligent Transfer Service
net start bitsRestarts the BITS service for updates

How to Run sfc /scannow in Windows

  1. Open Command Prompt as Administrator:
    • Press Windows + S and type cmd.
    • Right-click Command Prompt and select Run as administrator.
  2. Run the Command:
    • In the terminal, type: sfc /scannow
    • Press Enter.
  3. 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:

  1. “Windows Resource Protection did not find any integrity violations.”
    • Everything is fine—no corrupted files found.
  2. “Windows Resource Protection found corrupt files and successfully repaired them.”
    • Some issues were found and fixed.
  3. “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 /scannow again.
      • Use DISM (Deployment Imaging Service and Management Tool) to repair the image: swiftCopyEditDISM /Online /Cleanup-Image /RestoreHealth
      • Then rerun sfc /scannow.
  4. “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: bashCopyEditC:\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 /scannow reports 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

  1. Open Command Prompt as Administrator.
  2. Enter: swiftCopyEditDISM /Online /Cleanup-Image /RestoreHealth
  3. 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 /scannow again 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!

Leave a Comment

Scroll to Top