What Is DISM? How to Use It to Repair Windows

DISM, or Deployment Image Servicing and Management, is a command-line tool. It is a powerful tool to repair corrupt Windows system files, Windows Setup, and more. The tool can be a savior when your PC faces slight issues. Hence, as a Windows user, mastering DISM is handy to repair Windows and eliminate common PC problems.

What Is DISM?

DISM is a command-line tool that comes within the Windows system. As a command-line tool, it can only run from the Command Prompt, Windows PowerShell, or Windows Terminal.

It is responsible for servicing and preparing the Windows images for setup, PE, and the Windows Recovery Environment (RE). You can also use DISM to fix problems with live Windows PC. It also comes in handy to install, uninstall, configure and update Windows features, packages, drivers, and international settings.

When To Use DISM?

DISM directly communicates with the Windows system files. Hence, you might want to use it to repair Windows PC problems such as startup issues, performance slowdowns, or unexpected errors like the Windows Blue Screen of Death. It offers options that detect and replaces any corrupted or missing files on the local images.

The primary use of DISM is to repair the Windows image, i.e., ISO, VHD, etc., that can be deployed to multiple PCs. It can add or rem driver packages, modify language settings, enable or disable Windows features, and more.

In short, if your PC is facing any errors, running DISM commands can help you fix them.

What Is DISM How to use it to repair Windows

What Is DISM? How to Use It to Repair Windows

DISM is a command-line tool and not a fix itself. This means you need to run different options of DISM to eliminate issues on your PC. DISM offers you three main functions, these are:

  1. CheckHealth option
  2. ScanHealth option
  3. RestoreHealth option

You will need an admin account to execute these commands.

1] DISM CheckHealth Option

The CheckHealth option can detect any corrupted files in the local Windows image. It checks on the logs and a group of files together. However, it does not make any repairs to the system file. Instead, it will tell you if the image is healthy, repairable, or non-repairable.

To check the Windows image for issues with DISM, use these steps:

 DISM /Online /Cleanup-Image /CheckHealth

Checkhealth DISM Command

  • The tool will now perform a quick scan and let you know if the Windows image requires any fixes.

2] ScanHealth Option

While the CheckHealth command performs a quick scan, the ScanHealth option does a more advanced scan to determine if the Windows image has any issues. It takes a look at individual files at a time. This is the reason it takes more time compared to the CheckHealth option.

Here is how you can run the command:

  • Type this following command and press Enter on Windows Terminal
DISM /Online /Cleanup-Image /ScanHealth

Scanhealth DISM Command

ScanHealth will take several minutes to check if your Windows system needs repair.

3] RestoreHealth Option

The RestoreHealth option is one of the most crucial DISM commands. It is used for repairing Windows images and live Windows PC. It uses Windows update to get all the important files to fix any corrupted files in your computer.

However, this is usually a longer process than the CheckHealth and ScanHealth options, as it will download and replace the files of damaged or missing components.

To run this command, follow these steps to use DISM to repair Windows PC:

  • Execute the following command on Windows Terminal (Admin)
DISM /Online /Cleanup-Image /RestoreHealth

Restorehealth DISM Command

Note: You might find the tool stuck at some point in the ongoing process. However, it is normal behavior, and you shouldn’t close Windows Terminal.

What Are the Limitations Of DISM?

DISM can be your go-tool to fix common Windows system issues. But it has certain limitations to it. Such as:

  • Version Compatibility: You can only use DISM with target images of older Windows operating systems. It doesn’t work on target images of operating systems that are more recent than the installed version of DISM.
  • Remote installation: You cannot install a package to a remote computer over a network.
  • Multiple servicing commands are not supported: You cannot specify multiple commands on the same command line. For each task, you need to run a separate command.
  • Answer files: When you specify an answer file for an image, only the setting applied in the Offline Servicing configuration pass is applied. And all the other settings in the answer file will be ignored. As DISM only allows you to one answer file at a time.
  • Use an answer file to ensure package dependencies: You should use an answer file if you install multiple packages since some packages require other packages to be installed first. So by using an answer file, you can install multiple packages in the correct order.
  • Wildcards: Wildcards are not supported in DISM command lines.

What Are the Options Available For DISM?

/Append-Image Adds an additional image to a .wim file. It compares new files to the resources in the existing .wim file.
/Apply-FFU Applies a full flash utility (FFU) or split FFU to a specified physical driver.
/Apply-Image Applies a Windows image file .wim or split Windows image (swm) files to a specified partition.
/Capture-CustomImage Capture incremental file changes based on the specific install wim file to a new one.
/Capture-FFU Captures an image of a physical driver partition to a new ffu file.
/Capture-Image Captures the image of a drive to a new .wim file.
/Cleanup-Mountpoints Delete all the resources with a mounted image that has been corrupted.
/Commit-Image Applies the changes that you have made to a mounted image.
/Delete-Image Deletes the specified volume image from a .wim file with multiple volume images.
/Export-Image Exports a copy of the specified image to another file.
/Get-ImageInfo Displays information related to images contained in a wim, ffu, vhd, or vhdx file.
/Get-MountedImageInfo Returns a list of ffu, vhd, vhdx, and wim images currently mounted and information such as mount location, rear/write permission, and other details.
/Get-WIMBootEntry Displays WIMBoot configuration entries for a specific disk volume.
/List-Image Displays a list of the files and folders in a specific image.
/Mount-Image Mounts an image from a ffu, wim, vhd, or vhdx file to a specific directory.
/Optimize-FFU Optimizes an FFU image. So it can be deployed faster to different-sized disks.
/Optimize-Image This is the last command for running against an image before the image is applied to a device.
/Remount-Image Remounts a mounted image that has become inaccessible.
/Split-FFU It splits an existing FFU file into multiple read-only split sfu files.
/Split-Image Splits an existing .wim file into multiple read-only split swm files.
/Unmount-Image Unmounts the ffu, wim, vhd, or vhdx file and either commit or discards the changes made when the image was mounted.
/Update-WIMBootEntry Updates the WIMBoot configuration associated with a specific data source ID.
/Apply-SiloedPackage Applies one or more siloed provisioning packages (SPPs) to a specific image.

 

Conclusion

So that was all for DISM and how to use it to repair Windows images. Now go ahead and try running the commands and see if it fixes the issue. In case, even after running DISM, your issue is not solved, you might have to reset your Windows PC.

Nayan is a crypto and gadget enthusiast who likes to cover topics related to Tech, Startups, Crypto, Gaming, Windows, and other interesting areas. But when he is not working, you can find him playing games or watch random videos on YouTube.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.