What Is DISM Command? How to Repair Windows Image with It? - Qiling  

What Is DISM Command? How to Repair Windows Image with It?

Updated on Dec 04, 2023 | by Kent

Users may encounter issues with their Windows operating system, which can affect stored files. To resolve these problems, the DISM command can scan and repair issues with the .wim store. Additionally, SFC and DISM can be used to check for and fix disk errors.

DISM is a command-line tool used to repair and manage Windows images. It can be used to fix various issues such as corrupted system files, missing drivers, and other problems that may prevent Windows from booting properly. The tool can also be used to add or remove features from a Windows image, and to enable or disable Windows features.

What Is DISM Command?

DISM is a command-The DISM command is a built-in tool within Windows that is available through the command line or Windows PowerShell. It prepares and services Windows images, including those used for Windows Setup, Windows PE, and Windows Recovery Environment.

DISM is located in the folder C:\Windows\System32 in Windows 10 and 11 installations, and can also be run from any location in the Command Prompt terminal.

what is dism

However, the users cannot use the DISM command with Windows images that are newer than the version of the DISM that has been installed. This means if the DISM version is outdated, it will not be able to work with newer Windows images.

How to Run DISM from CMD?

To run a DISM command from the Command Prompt on Windows 10/11 devices, follow these steps: Open the Command Prompt as an administrator. You can do this by typing "cmd" in the Windows search bar, right-clicking on the Command Prompt result, and selecting "Run as administrator." Alternatively, you can search for "Command Prompt" in the Start menu, right-click on the result, and choose "Run as administrator." Once the Command Prompt window opens, type the DISM command you want to run, followed by the specific parameters and options required for that command.

Step 1. Select "Command Prompt (Admin)" from the "Start" button.

command prompt

Step 2. Type `dism /online /cleanup-image /restorehealth` in the Command Prompt window and press enter. You can copy this command and paste it into the window by right-clicking it.

dism cmd

Step 3. A progress indicator will be shown during the scan for integrity violations in the Command Prompt window.

Step 4. After the previous step, wait for the process to complete. This will show you if there are any integrity violations found and are thereby fixed.

Step 5. It's recommended to reboot your system after any repairs have been found and performed to ensure the changes take effect and any potential issues are resolved.

dism restore health

How to Repair Windows Image with DISM?

The session will cover how to repair Windows images using DISM and the different commands that can be used for this purpose, including options available on Windows 10 for repairing missing or corrupted files.

DISM Command with CheckHealth Option

The CheckHealth option in Windows 10 is used to identify corruptions within the operating system's image, but it does not have the capability to repair these issues.

Step 1. Select Start and search for "Command Prompt"

Step 2. Right-click the top result, then select the "Run as Administrator" option from the context menu.

Step 3. Run the command "dism /online /cleanup-image /checkhealth" to check for any corruptions that need to be repaired, and then run "dism /online /cleanup-image /restorehealth" to repair any issues found. This will ensure your system is in a healthy state.

dism check health

DISM Command with ScanHealth Option

ScanHealth carries a more advanced scanning process to indicate any problems in the image through the following steps.

Step 1. Click on Start and search for "Command Prompt", selecting the "Run as Administrator" option.

Step 2. Run the command `dism /online /cleanup-image /scanhealth` and press enter. This will scan the Windows 10 image and provide a result, which may take several minutes to complete, to indicate if any repairs are needed.

dism scan health

DISM Command with RestoreHealth Option

To use the RestoreHealth option, you can follow these steps: The RestoreHealth option helps not only scan the system image but also rectifies if there is any problem. This feature can be used to troubleshoot and resolve issues with the system image, making it a useful tool for maintaining the health and integrity of the system.

Step 1. To open the Command Prompt as an administrator, follow these steps: Click on the Start button to open the Start menu, then search for "Command Prompt" in the search bar. Once the search results appear, select the "Command Prompt" option, and then click on the "Run as Administrator" option that appears below it.

Step 2. To clean up the system and restore health, type `dism /online /cleanup-image /restorehealth` and press enter. This process may take a few minutes to complete, and the tool will then connect to Windows update to download and replace any damaged files.

dism restore health 1

The Bottom Line

Finding problems within your operating system and the files they store is a common issue, but it can also be redeemed. The DISM Command, which stands for Deployment Image Servicing and Management, offers three options to repair the Windows images, making it a useful tool to resolve these issues.

To avoid system damage and data loss, use the DISM command to fix issues with your system. This will help recover your files properly. It's also essential to back up your important files and data regularly to prevent any potential loss.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!