DISM RestoreHealth Command: Repair Windows Image

DISM Restore Health

0 Comment

6 mins Read

DISM Restore Health

Corrupted Windows files are bad news for any user, be it an IT expert or an amateur. When this happens, a range of issues could occur, from performance issues and problems with updating Windows to Windows not even booting up.

Typically, when Windows can’t start, you’ll get the infamous blue screen of death (BSOD). When that heart-dropping screen pops up, you’ll see an error indicating that Windows can’t start because of either a driver error or broken system files.

Both of these issues can be quite a headache to deal with; however, let’s assume the issue is with corrupted system files, and you don’t need to spend a whole lot looking for driver updates and missing drivers.

In this case, three common commands can come to your rescue: the CHDSK, the SFC, and the DISM command. If the first two don’t work, then DISM is your last line of defense before having to perform a repair install or potentially re-install Windows completely.

So, let’s see what the DISM command is and how you can use DISM restore health command to repair the Windows system image, hopefully fixing all your issues.

What Is DISM?

DISM, or Deployment Image Servicing and Management, is a built-in command-line tool in Windows 10 that admins use for preparing, modifying, and repairing system images. This includes Windows Setup, Windows Preinstallation Environment, and Windows Recovery Environment.

DISM is also used with the local recovery image to fix pretty much any system problem. That said, note that the DISM command is not a reinstallation of Windows as it finds vital core files required to run and collect information, and upgrades or repairs any files that may be broken or out-of-date.

As for how DISM repairs Windows, DISM actually works in tandem with SFC. See, SCF on its own is a pretty capable tool for fixing specific errors and booting problems. That said, SCF won’t work if one or more system files in the local image are corrupted.

That’s where DISM comes in handy, as you can use the DISM command to repair the image using the “install.wim” image file. However, DISM also has many other uses on its own. Now that you have an understanding of what DISM is, let’s get into how you can use DISM restore health command and repair your Windows system image.

Step-By-Step Guide to Repairing Windows Using DISM

The DISM command tool has several uses and isn’t only limited to repairing Windows. That said, repairing Windows itself has a few variations depending on the severity of your issues.

So, I’m going to discuss not only how to repair Windows with the DISM restore health command but also some of the issues you may run into through the process, such as situations where Windows doesn’t boot up or your Windows installation files are too corrupted to be used for repairing the Windows image.

DISM.exe Online Cleanup Image Restorehealth

Before anything else, we need to check for any corrupted files. To do this, we’ll need to use the CheckHealth and ScanHealth commands. Note that this is only where you can boot up and log into Windows.

Checking the Health of Windows System files

First, we’ll need to open up a command-line interface. To do that, click on Start, search for either Command Prompt or Windows PowerShell, and choose Run as Administrator. Then, we’re going to do two scans, one quick and one advanced scan, with the CheckHealth and ScanHealth commands:

DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth

Once the two previously mentioned commands have detected corrupted files, we can use the DISM Restorehealth command to fix them:

DISM /Online /Cleanup-Image /RestoreHealth

The process can take a few minutes so be patient and do not interrupt the process until the progress bar fills up completely. The progress bar may stop a few times for a few minutes, so don’t worry when that happens, and let it finish the process.

When the DISM Restore Health command is done, you can reboot your device, and everything should be fixed and operational.

Using an Installation Media to Restore System Files

If DISM is unable to repair your Windows installation, then it’s likely that the files on your hard disk are corrupted. In this case, you’ll need to use another installation source to repair your Windows files. You’ll need to have created a recovery USB for this.

To do this, you’ll first need to download the latest version of Windows 10 installation media from Microsoft. Then follow these steps:

  1. Start the program and accept the terms and conditions.
  2. Next, you’ll see two options: Upgrade this PC now and Create installation media. Select the second option and click next.
  3. Select the corresponding language, edition, and architecture for the Windows 10 Recovery USB based on the computer you want to use the USB on.
  4. Select your USB flash drive from the drive list shown.
  5. Wait for the tool to finish.

That said, if you have access to Windows, you can just download the Windows ISO file and mount it by double-clicking—that way, you don’t need to use the USB drive as your installation source. Then, with your installation source figured out, use the following command to repair Windows:

DISM /Online /Cleanup-Image /RestoreHealth /source:D:\Sources\Install.wim /LimitAccess

Note that you’ll need to change the D:\ in the source path with the respective drive letter of either your ISO file or USB drive.

If you run into any problems or issues when executing the DISM RestoreHealth command, it could be due to a mismatch between the image running on your device and the image being used to repair your Windows. These mismatches could be due to a difference in the OS, bit (x64 or x86), or default language.

For instance, for any reason, you could’ve downloaded and installed the UK English installation instead of the American English installation, which can lead to errors. You can check the international settings for the Windows image that’s online and running on your computer with the following command:

DISM /Online /Get-Intl

As for the image you’re using to repair your Windows, you can use the following command to check the international settings for it:

DISM /Image:<path_to_offline_image_directory> /Get-Intl

Again, you’ll need to input the source path with the respective drive letter of either your ISO file or USB drive.

If there is a discrepancy between the languages used in the offline image you want to use to repair your Windows and your online image, you’ll need to use these DISM commands: /Set-UILang, /Set-UILangFallback, /Set-UserLocale, and /SetInputLocale.

Repairing Windows Installation

We’re not done just yet, as the previous steps were for repairing the Windows image stored on your computer. We haven’t repaired the actual Windows installation yet. That’s why you may get errors in Windows or are unable to boot up Windows at all.

At this stage, the SFC command comes into play. Once again, open a command prompt or PowerShell window and run the following command:

sfc /scannow

And with that, your Windows system should now be fixed. However, you might need to repeat the command a couple of times if you’re still facing issues.

Useful DISM Uses and Features

As I mentioned earlier, the DISM command tool isn’t just for repairing Windows; it has other uses and features, too.

Free Up Disk Space With DISM Command

Windows keeps a copy of all Windows updates that have ever been installed so that you can uninstall one or more updates. That said, these copies can take up plenty of disk space and are usually unnecessary.

With the help of the DISM tool, you can delete these old copies of Windows updates and free up disk space. However, remember that after deleting these copies, you won’t be able to uninstall Windows updates.

To clean up your disk, first, you’ll need to analyze the Windows Update component store. To do that, you’ll need to right-click on Start and open Windows Powershell or Windows Terminal. Then enter the following command:

Dism /Online /Cleanup-Image /AnalyzeComponentStore

After the command has finished analyzing the component store, you’ll need to use the two following DISM commands to start the cleanup and reduce file sizes. First, use the following command to start the cleanup:

Dism /Online /Cleanup-Image /StartComponentCleanup

Then, use this command to reduce the file sizes even more:

Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase

I recommend doing these cleanups once a month or so, as you can save around 3 or 4GB each month.

DISM can also be employed for a handful of other, more technical uses like capturing and applying images of hard disk partitions, mounting and modifying a Windows Image, capturing and applying a Windows image using a single .WIM file, and creating a data image. You can check out Microsoft Learn tutorials for those DISM functions.

Final Thoughts

As you can see, DISM command is a pretty handy tool that can solve many of your Windows issues, improve its performance, and even free up disk space. DISM can do plenty more, so if you’re interested, you can check out Microsoft Learn for more info.

Lastly, as I mentioned earlier, don’t forget to run the SFC scannow command to finalize the Windows repair process, as it’s crucial to getting your computer back up and running again.

FAQs

What is DISM?

DISM is a built-in command-line tool in Windows 10 used for preparing, modifying, and repairing system images. It works in tandem with SFC to repair corrupted system files and is also used with the local recovery image to fix various system problems without the need for a complete re-installation of Windows.

What can DISM do other than repair Windows?

Besides repairing Windows, the DISM command frees up disk space and modifies Windows Images. It can also capture and apply Windows images with a single .WIM file and create data images. DISM is also used for servicing Windows images, managing drivers, handling Windows features, and setting up international settings. For official details, check out Microsoft Learn tutorials.

What should I do if the DISM RestoreHealth command fails to repair my Windows installation?

If the DISM restore health command fails to repair your Windows installation, it may be due to severe corruption in your system files or mismatches between the repair source and the installed Windows version. In such cases, you can try the following steps:

  • Ensure the installation media matches your Windows version and language settings.
  • Use the command DISM /Online /Cleanup-Image /CheckHealth and DISM /Online /Cleanup-Image /ScanHealth to identify issues.
  • If issues persist, perform an in-place upgrade by using the installation media to upgrade your system without losing data, or consider a fresh installation of Windows.
Your friendly neighborhood writer guiding you through the sea of tech and cloud.

Comments

Leave a Comment

Your email address will not be published. Required fields are marked *


Latest Posts