Learn how to check and repair damaged system files using these essential DISM commands.
ShotxArbaz/Shutterstock
A Windows installation relies on a core set of system files to run applications, install updates, and handle daily tasks. When these files become corrupted or go missing, the system can behave unpredictably—triggering errors, feature failures, freezes, or other instability. Standard restarts and basic troubleshooting often cannot restore damaged system files. For these situations, Windows includes a built-in repair utility called Deployment Image Servicing and Management (DISM).
DISM is a command-line tool that scans Windows system images for corrupt files and attempts to fix them. Three key DISM commands handle this process: CheckHealth, ScanHealth, and RestoreHealth. You can run these commands in either Command Prompt or PowerShell, but both require administrator privileges to make system-level changes. Importantly, DISM only touches system files; your personal data remains unaffected.
Core DISM Commands for Repairing a Damaged Windows Installation
All three commands share a common syntax starting with DISM /Online /Cleanup-Image. The segments after “DISM” are command-line options. The /Online option targets the currently running Windows installation, while /Cleanup-Image initiates recovery operations on that installation.
The first command, DISM /Online /Cleanup-Image /CheckHealth, quickly checks whether Windows has already flagged any corrupt system files and whether that corruption is repairable. This is the recommended initial step because it completes in seconds.
The next command, DISM /Online /Cleanup-Image /ScanHealth, performs a fresh, thorough scan of the component store and reports any issues it finds. Unlike CheckHealth, this operation can take several minutes but provides a current health assessment of the system file repository.
Finally, DISM /Online /Cleanup-Image /RestoreHealth scans for corruption and automatically attempts repairs. By default, it downloads replacement files via Windows Update. The Windows component store is a protected internal repository containing critical system files required for servicing, updating, and customizing the OS.
What to Do If DISM Cannot Repair Your Installation
In some cases, system file damage also breaks Windows Update, preventing DISM from downloading the necessary files. When that happens, you can use official Windows installation media as an alternate repair source. Download a Windows ISO from Microsoft’s official site, right-click the ISO, and select Mount. Windows will create a virtual drive with a drive letter, making the installation files accessible.
Next, determine which Windows edition is on the installation media. Open an elevated Command Prompt and run DISM /Get-ImageInfo /ImageFile:D:\sources\install.wim. This lists the available editions along with their index numbers. Note the index number that matches your installed edition.
Now run the repair command pointing to the mounted ISO: DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6 /LimitAccess. Replace D: with the drive letter of your mounted ISO and 6 with the index number for your edition. This tells DISM to use the local installation media instead of Windows Update.
After DISM finishes, run sfc /scannow to repair any remaining damaged or missing system files. Microsoft recommends running DISM before the System File Checker (SFC) because DISM repairs the component store that SFC relies on to replace corrupted files.
Also Read
- Trump Suspends Iowa Detonation, Assigns Blame to Governor-Elect for Potential Hazard
- Google Envisions Hyper-Personalized AI TV Channels Starring Digital Versions of Viewers
- AI-Assisted Collaboration Offers New Path in Solving the Riemann Hypothesis
- Bluetooth brakes are broken as researchers find anyone can control them


