DISM. exe /Online /Cleanup-Image /Restorehealth errors Explained
DISM.exe /Online /Cleanup-Image /Restorehealth errors Explained. The deployment image servicing and management tool (DISM) is manipulated to scan and restore potential issues within the windows that may impact an operating system. SysAdmins also use DISM to manage and update Windows Operating Systems images.
DISM /Online /Cleanup-Image /Restorehealth” is a Dism command that runs a scan for corruption and repairs problems that it finds with the operating system you are logged into. Ahead, we will explain how DISM.exe/Online/Cleanup-Image/ Restorehealth” works and discussed some examples of how you can use this all-important DISM command to fix certain Windows problems.
What is a /Cleanup-image switch and how does it work?
For this deployment Image Servicing and Management tool to work, you need to follow other image servicing tools and commands with /online or /Image switch. One of the few is the cleanup-image switch:
Cleanup-image switch.
This switch functions to clean and recover operations and undertakings on the running operating network in Dism.exe/online/Cleanup-image/ Restorehealth” command. Which means when you run dism.exe/Online/Cleanup-image, you are asking the Dism tool to:
- Target running operating system.
- Cleanup and repair operations on the system.
/Restorehealth switch
It attempts to repair the corrupted scanned files automatically from the operating network. DISM.exe /Online /Cleanup-Image /Restorehealth” command does the following:
- /Restorehealth Switch, scans the ongoing operating system for corrupt files and attempts to restore them.
- The cleanup-image switch has to go for cleaning and recovery operation on a system.
- The online switch requires DISM.exe to target the running operating system rather than offline windows image(.wim) or virtual hard disk.
How to Check your operating system health
You can use the command:
DISM /Online /Cleanup-Image /ScanHealth
Running Dism.exe From Windows Recovery Mode?
Repairing your windows10 computer that doesn’t boot at all, use the following steps:
- Download Windows 10 ISO, burn it in your DVD, and boot your system.
- When you see your computer boots displays on the screen, press any key to boot into the Windows 10 DVD.
- Click next on the window setup screen. Then click repair your computer.
- Click troubleshoot next. Then hit the command prompt button.
- Command prompt loads.
Next step is to extract the file before using the DISM /Online /Cleanup-Image /RestoreHealth command with a WIM file.
Steps to extract the OS WIM file from install.esd:
- You need to determine the drive your ISO image was mounted first. However, this depends on the number of drives on your computer. Acknowledging that it can’t drive C, try D and then E, and so on.
- Enter the drive name, followed by a colon to alter the drive name. Then, press enter. D
- Proceed, type Dir and press the enter key. Observe possible drive letters until you find the one with folders, boot, EFI, sources, and support. This is the drive your windows 10 Iso has made file directories of on a storage device.
- Next, you have to find out the index number of the Windows10 edition you would prefer to use. Use the following command: CD sources.
Type this command and hit the enter key. dism /Get-WimInfo /WimFile:install.esd. You will see an outcome to the command written above.
Disadvantages Of The DISM.exe /Online /Cleanup-Image /Restorehealth Command
The DISM command is fairly complex, with so many switches and parameters. One of the disadvantages of the DISM.exe command is its complexity. There are also too many switches and sub switches and the order you have to use them. For example, as I mentioned earlier, you must specify the /Cleanup-Image switch before /Restorehealth.
Advantages Of The DISM.exe /Online /Cleanup-Image /Restorehealth Command
- DISM automatically creates a log file, dism.log. When you run the DISM command (including the DISM.exe /Online /Cleanup-Image /Restorehealth command), DISM creates a log file. The log file – located in \WINDOWS\Logs\DISM\ – is useful for troubleshooting DISM command errors.
- DISM offers a PowerShell module. If you prefer to work with PowerShell, DISM offers a PowerShell module that you can use to manage Windows Operating System images via PowerShell.
- DISM command offers detailed help information. The DISM command-line tool offers robust help. You can access this help information by adding /? after a DISM command.
- The /Cleanup-Image switch offers two switches you can use to check an OS image’s health. As the /Cleanup-Image switch has two sub-swicthes. Specically, you can use the /CheckHealth and the /ScanHealth sub-switches of the /Cleanup-Image switch to check the health of your OS images.
DISM command with CheckHealth option
The CheckHealth option with the DISM tool allows you to determine any corruptions inside the local Windows 10 image. However, the option does not perform any repairs. To check the Windows 10 image for issues with DISM, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to perform a quick check and press Enter:DISM /Online /Cleanup-Image /CheckHealth
DISM command with RestoreHealth option To repair Windows 10 image problems
If there are problems with the system image, use DISM with the RestoreHealthoption to automatically scan and repair common issues. To repair Windows 10 image problems with the DISM command tool, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to repair the Windows 10 image and press Enter:DISM /Online /Cleanup-Image /RestoreHealthQuick note: If the command appears stuck, this is normal behavior. After a few minutes, the process will complete successfully.
DISM command with ScanHealth option
The ScanHealth option does a more advanced scan to find out whether the image has any problems. To check image problems with the ScanHealth option, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to perform an advanced DISM scan and press Enter:DISM /Online /Cleanup-Image /ScanHealth
Recommendation