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
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:
- CheckHealth option
- ScanHealth option
- 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:
- Press Windows + X to open Start Button Menu and select Windows Terminal (Admin).
- Type this following command and press Enter
DISM /Online /Cleanup-Image /CheckHealth
- 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 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
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?
|Adds an additional image to a .wim file. It compares new files to the resources in the existing .wim file.
|Applies a full flash utility (FFU) or split FFU to a specified physical driver.
|Applies a Windows image file .wim or split Windows image (swm) files to a specified partition.
|Capture incremental file changes based on the specific install wim file to a new one.
|Captures an image of a physical driver partition to a new ffu file.
|Captures the image of a drive to a new .wim file.
|Delete all the resources with a mounted image that has been corrupted.
|Applies the changes that you have made to a mounted image.
|Deletes the specified volume image from a .wim file with multiple volume images.
|Exports a copy of the specified image to another file.
|Displays information related to images contained in a wim, ffu, vhd, or vhdx file.
|Returns a list of ffu, vhd, vhdx, and wim images currently mounted and information such as mount location, rear/write permission, and other details.
|Displays WIMBoot configuration entries for a specific disk volume.
|Displays a list of the files and folders in a specific image.
|Mounts an image from a ffu, wim, vhd, or vhdx file to a specific directory.
|Optimizes an FFU image. So it can be deployed faster to different-sized disks.
|This is the last command for running against an image before the image is applied to a device.
|Remounts a mounted image that has become inaccessible.
|It splits an existing FFU file into multiple read-only split sfu files.
|Splits an existing .wim file into multiple read-only split swm files.
|Unmounts the ffu, wim, vhd, or vhdx file and either commit or discards the changes made when the image was mounted.
|Updates the WIMBoot configuration associated with a specific data source ID.
|Applies one or more siloed provisioning packages (SPPs) to a specific image.
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.