In this blog, we will discuss what is “DISM.exe/DISM restore health/Cleanup-Image is and how it works along with some examples. DISM restore health is a DISM command which can repair issues with the running Operating system you are logged into. Let’s dive in and understand all about it.

Also Read: Make laptop screen brighter than max

What is DISM.EXE/DISM restore health?

DISM.exe is an acronym for Deployment Image Servicing and Management. It is a Windows command-line tool that you can use to manage both Windows Online and Offline Images. The command will fix any problem(s) that you will identify in your current operating system.

DISM.exe /Online vs /Image

While running the DISM.exe command, you should either specify the /Online or /Image switch. In the case of specifying the /Online switch, DISM.exe will not expect a path to an offline image. Then the command tool will rather target the running operating system. On the other hand, if you are specifying the /Image switch, the Deployment Image Servicing and Management tool will expect that you will specify the path to the root directory of an offline Windows image.

In conclusion, you can say that DISM.exe /Online switch means asking DISM to target the running Operating system rather than an offline image.

DISM.exe /Cleanup-Image

In order for the DISM.exe command to work, you must follow the /Online or /Image switch by other image servicing commands. The command-line options for the DISM.exe /Online switch include the /Cleanup-Image switch. This switch performs operations like cleanup and recovery on the running Operating System. So, when you are running the command “DISM.exe /Online /Cleanup-Image”, you are asking the following from the Deployment Image Servicing and Management tool:

  • Firstly, target the running Operating System.
  • Then you have to perform cleanup and recovery operations on the running Operating System.

DISM Restore health

/Restorehealth switch is the last switch in the “DISM.exe /Online /Cleanup-Image /Restorehealth” command. The /RestoreHealth switch helps in scanning the Operating System for corrupt files. In case the DISM finds corrupt files then it will attempt to repair them automatically.

What Does “DISM.exe /Online /Cleanup-Image /Restorehealth” Do?

Let’s summarise the working of the command with the 3 switches in the command explained. While running DISM.exe /Online /Cleanup-Image /Restorehealth command, the following happens:

  • The /Online switch gives instructions to DISM.exe for targeting the running Operating System instead of an offline Windows image (.wim) file or virtual hard disk (.vhd or .vhdx)
  • The switch of /Cleanup-Image performs operations like cleanup and recoveryon the running Operating System.
  • Lastly, the switch of /Restorehealth will scan the running Operating System to find corrupt files and attempts to fix them.

The result of the command is mentioned below:

DISM restore health

How to use DISM restore health to Check Your Operating System Health?

DISM.exe can surely help in finding problems in your OS. So, when you are facing problems with your Windows computer, you should use the /ScanHealth switch to perform an advanced scan. The command is mentioned below:

DISM /Online /Cleanup-Image /ScanHealth

You can see the result of the command in the image given below:

How to run DISM.EXE from Windows 10 Recovery Mode?

Sometimes it may happen that Windows won’t boot. If you want to repair your Windows 10 computer that is not booting at all then use the steps mentioned below:

  • Firstly, you should download Windows 10 ISO, burn it into a DVD and then boot your computer along with it.
  • When your computer boots as shown in the image below, you just have to press any key to boot into the Windows 10 DVD.
DISM restore health
  • You have to click on Next on the Windows Setup screen. Then click on the option of Repair your computer.
DISM restore health
  • Now click on Troubleshoot and click on Command Prompt.
DISM restore health
  • Now the Command Prompt will load.

How To Extract Install.WIM from Windows 10 ISO?

Before using DISM /Online /Cleanup-Image /restorehealth command with a WIM file, you should ensure that the file is extracted. In order to extract the OS WIM file from install.esd, follow the steps given below:

  • Firstly, you have to determine the drive your ISO image was mounted. It depends on the number of drives on your computer. You have to keep trying if it isn’t drive C, try D, then E and so on.
  • If you want to change to a drive then enter the drive name, followed by colon. After doing so, press Enter.
  • Now type Dir and press Enter.

You should keep checking possible drive letters until you find the one with folders, boot, EFI, sources, and support. In this drive, your Windows 10 ISO is mounted.

  • You have to find the index number of the Windows 10 edition that you want to use. So, execute the command below for doing this:
cd sources
  • Thereafter, type this command and press Enter.
dism /Get-WimInfo /WimFile:install.esd

The result of the last command is mentioned below in the image:

DISM restore health

All the editions of Windows 10 have their index number in the list. We are using Windows 10 Pro for this blog as we have to use the same edition for DISM repair. In order to see the index number, just scroll down and you will find it.

We require the index number 6. Before proceeding, please ensure to create a folder for extracting your Install.WIM file. You have to type the below-mentioned command and press Enter to do this type.

mkdir d:\test
  • Now let’s extract Install.WIM to d:\test folder. In order to do this you have to run the command below:
dism /export-image /SourceImageFile:install.esd /SourceIndex:6 /DestinationImageFile:d:\test\install.wim /Compress:max /CheckIntegrity

You can proceed to the next step when the command completes.

  • Lastly, in order to repair windows 10 using intall.wim, you should run the command below:
DISM /Online /Cleanup-Image /RestoreHealth /Source:d:\test\install.wim

As we ran the command, it returned an error 50: DISM does not support servicing Windows PE with the /Online option. If you are also receiving this error then you should find the resolution below this image.

How to Fix DISM Error 50?

When you receive error 50 – “DISM does not support servicing Windows PE with the /online option”, you can resolve it with the steps mentioned below:

  • Firstly, type regedit from the command prompt and press Enter. Then, the Registry editor will open.
  • Now navigate to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control. You have to do a right-click on MiniNT key and delete it. Then click on Yes for delete confirmation.
DISM restore health
  • Now type Exit on the command prompt and press on Enter. Select the option of Turn Off your PC.
DISM restore health
  • You have to repeat the steps from ‘How to run DISM.EXE from Windows 10 Recovery Mode?’ when the computer reboots.
  • After the Command Prompt loads, you have to change the drive letter where your ISO is mounted. Additionally, change the\Sources directory. Now you have to rerun the DISM command mentioned below:
DISM /Online /Cleanup-Image /RestoreHealth /Source:d:\test\install.wim 

If error 50 still persists, you can read the DISM log shown in the error message.

DISM restore health


We hope that our blog helped you in understanding the DISM restore health. Thank you for reading our blog.

Categorized in:

Tagged in: