• Thread Author

Repair Corrupted System Files with SFC and DISM in Windows 10/11​

Difficulty: Intermediate | Time Required: 20 minutes

Introduction​

Corrupted system files can cause crashes, slowdowns, driver issues, or Windows features failing to start. Windows includes two built‑in tools—System File Checker (SFC) and Deployment Image Servicing and Management (DISM)—that can scan for and repair corrupted system files and component store problems. This guide shows you how to use DISM and SFC together to restore your Windows 10/11 system files safely and efficiently.

Prerequisites​

  • Administrative access to the PC (you must run commands as an administrator).
  • A stable internet connection (recommended) — DISM often downloads replacement files from Windows Update.
  • Optional: a Windows 10/11 ISO or installation media if you need to provide a local source for repair files. (On Windows 10/11, you can mount an ISO by right‑clicking it in File Explorer and choosing "Mount".)
Note about Versions: DISM and SFC commands used here apply to Windows 10 and Windows 11 builds. On both OSes, DISM’s /Online mode targets the running OS. If you're using an Enterprise image, or the PC has no internet access, you'll need to provide a local /Source (ISO or WIM/ESD).

Step-by-step instructions​

Follow these steps in order. Total time typically ~10–20 minutes, depending on disk speed and network.
  1. Create a restore point (recommended)
    1. Open Start → type "Create a restore point" → press Enter.
    2. Select the system drive (usually C → Configure → turn on protection and create a restore point.
      Tip: If something goes wrong, System Restore can roll back changes.
  2. Open an elevated Command Prompt or PowerShell
    1. Click Start, type cmd (or PowerShell).
    2. Right‑click Command Prompt (or Windows PowerShell / Windows Terminal) → Run as administrator.
  3. Check basic system health with DISM (quick tests)
    • (Optional) First check whether the component store reports problems:
      DISM /Online /Cleanup-Image /CheckHealth
    • If the above says the image is repairable or corrupt, continue. If it reports "No component store corruption detected", you can still run a deeper scan.
  4. Scan the component store (takes a few minutes)
    DISM /Online /Cleanup-Image /ScanHealth
    • This performs a more thorough check and reports whether problems are found.
  5. Repair the component store (real fix)
    • If issues were found, run:
      DISM /Online /Cleanup-Image /RestoreHealth
    • By default this uses Windows Update to download replacement files. This step may take 5–15 minutes or longer depending on your system and network.
    Note: If DISM cannot contact Windows Update or returns errors (e.g., 0x800f081f, 0x800f0906), you can provide a local source. See step 8 below.
  6. Run System File Checker to repair protected files
    • After DISM completes successfully, run:
      sfc /scannow
    • SFC scans for missing/corrupted protected system files and replaces them using the component store (which DISM has already repaired). This can take 5–15 minutes.
  7. Reboot your PC
    • Restart even if not prompted. A reboot ensures replaced files are fully committed.
  8. If DISM fails or needs a local source (optional advanced)
    • Mount a Windows 10/11 ISO or insert installation media. Note the drive letter (e.g., E. Then run:
      DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:E:\sources\install.wim:1 /LimitAccess
    • If your ISO has an ESD instead of WIM, or if multiple indexes exist, adjust the path and index accordingly:
      DISM /Online /Cleanup-Image /RestoreHealth /Source:esd:E:\sources\install.esd:1 /LimitAccess
    • After this, run sfc /scannow again.
  9. Review logs (if you want details)
    • DISM log: C:\Windows\Logs\DISM\dism.log
    • SFC log (CBS): C:\Windows\Logs\CBS\CBS.log
      Use these if you need to post details on the forum or investigate unusual errors.

Helpful tips, warnings, and troubleshooting notes​

  • Tip: Run DISM first, then SFC. DISM repairs the underlying component store that SFC relies on; doing DISM first increases SFC's success rate.
  • Warning: Always run commands from an elevated prompt (Run as administrator). If not elevated, commands will fail.
  • Note on time: Some commands can take 10–30 minutes on slower drives—be patient and avoid interrupting them.
  • Problem: DISM returns 0x800f081f / 0x800f0906
    • Likely cause: DISM couldn't download files from Windows Update. Fixes:
    • Ensure internet access and that Windows Update services are running.
    • Provide a local source (mounted ISO or install.wim) using the /Source option.
  • Problem: sfc /scannow still reports “Windows Resource Protection found corrupt files but was unable to fix some of them”
    • Try running SFC in Safe Mode, or run DISM /RestoreHealth then SFC again. If issues persist, check the CBS.log and share relevant excerpts on the forum.
  • Use System Restore or Reset if repairs fail:
    • If SFC/DISM cannot repair your system, consider System Restore (if available) or "Reset this PC" as a last resort.
  • Offline repairs:
    • For an offline image or another Windows installation, DISM supports /Image:<path> to target an offline mounted image—this is advanced usage and typically unnecessary for standard repair.
  • Back up important data before major repair actions or system resets.

Common commands summary​

  • Check quickly:
    • DISM /Online /Cleanup-Image /CheckHealth
  • Deep scan:
    • DISM /Online /Cleanup-Image /ScanHealth
  • Repair (default via Windows Update):
    • DISM /Online /Cleanup-Image /RestoreHealth
  • Run SFC:
    • sfc /scannow

Conclusion​

Using DISM and SFC together is a reliable way to repair corrupted system files in Windows 10 and Windows 11. DISM fixes problems in the component store (which SFC uses), and SFC restores protected system files. This sequence often resolves performance issues, crashes, and feature failures without a full reinstall.
Key Takeaways:
  • Run DISM /RestoreHealth first, then sfc /scannow for best results.
  • DISM uses Windows Update by default; supply a local /Source (ISO/WIM/ESD) if needed.
  • Always run commands as Administrator and reboot after repairs.
  • Review logs (C:\Windows\Logs\DISM\dism.log and C:\Windows\Logs\CBS\CBS.log) for diagnostics.

This tutorial was generated to help WindowsForum.com users get the most out of their Windows experience.