Windows relies on a collection of critical system files to run applications, install updates, and perform daily computing tasks. When these files become damaged or missing, the operating system may exhibit erratic behavior, including freezes, unexpected errors, and features that fail to function correctly. In situations where restarting the computer or standard troubleshooting steps do not resolve the issue, Microsoft provides a built-in command-line utility called Deployment Image Servicing and Management (DISM).

DISM is designed to scan Windows system images for corrupt files and attempt repairs. It exclusively targets system files, leaving personal documents and user data untouched. Three specific commands within this utility are recommended for diagnosing and fixing component store corruption.

The primary repair commands

All three commands follow a base syntax starting with DISM /Online /Cleanup-Image. The /Online option directs the tool to act on the currently running installation, while /Cleanup-Image performs recovery operations. The first command, DISM /Online /Cleanup-Image /CheckHealth, checks if Windows has flagged corrupt system files and determines if the corruption is repairable. This step completes quickly and serves as an initial diagnostic.

The second command, DISM /Online /Cleanup-Image /ScanHealth, performs a fresh scan of system files and reports findings. Unlike the check command, this operation takes several minutes but provides a detailed report on the health of the component store. The third command, DISM /Online /Cleanup-Image /RestoreHealth, scans the component store for corruption and attempts automatic repairs. By default, this command uses Windows Update to obtain necessary replacement files.

Troubleshooting failed repairs

System file damage can sometimes break Windows Update, preventing DISM from downloading replacement files. If this occurs, users can supply repair files using official Windows installation media. Users must download a Windows ISO from Microsoft, mount the file to create a virtual drive, and identify the index number of their installed edition using the DISM /Get-ImageInfo command.

Once the index number is noted, users can run a modified RestoreHealth command specifying the mounted ISO as the source. After DISM completes the operation, Microsoft recommends running the sfc /scannow command to repair any remaining damaged or missing system files. This sequence ensures the Windows component store is repaired before the System File Checker attempts to replace corrupted files.

What it means

These commands offer a powerful set of tools for users experiencing persistent system instability that cannot be fixed through standard settings or restarts. Since the process operates at the system level, it requires administrator privileges and should only be used when other troubleshooting methods have failed. The distinction between checking health, scanning for issues, and actively restoring files allows users to diagnose the severity of corruption before committing to repairs.

For most users, the availability of these built-in utilities means they do not need to reinstall Windows or seek external support for common file corruption issues. However, the requirement to mount installation media suggests that users who frequently encounter these problems may need to maintain access to official system recovery files. The process remains limited to system files, so there is no risk of data loss during the repair procedure.

Would you prefer to troubleshoot system errors using command-line tools like DISM, or do you rely solely on graphical interface settings?