The DISM command tool is a powerful Windows tool that can edit or repair Windows image files. If you are having issues with your system, you may run the DISM command to try and fix such errors. You can utilize the command prompt or the Windows Powershell to run DISM commands and fix your system.
However, some errors can completely make your PC unusable, restricting you from booting into Windows. In that case, you will have to boot into the Windows Recovery Environment and run the DISM commands from there.
How to Run DISM Commands to Repair Windows?
DISM stands for Deployment Image Servicing and Management. Although DISM has a variety of uses, this tool is commonly used to fix a malfunctioning Windows system. This is a command exclusive tool that needs to be run from thecommand prompt or the Powershell.
To fix your Windows system, the DISM command is generally followed by switches that represent the target image, which can be either/Onlineor/Image. The/Onlineswitch will select your current running operating system as a target to fix, whereas/Imagewill allow you to specify another Windows image.
There is one mainstream command which we will use to repair Windows. There are a couple of other commands as well, which you may use to check for errors and repairability before repairing it.
The general syntax to fix a Windows image is:
DISM [target image] /Cleanup-Image [servicing_option] [servicing_parameter]
An online Windows image is the image that is currently in use to run the Operating system. When doing an online DISM with no servicing parameters, it takes files from previously downloaded Windows update components. However, if these update components are corrupt, it will download them again, which requires an internet connection.
But in case you don’t have internet to re-download the corrupt update components, you may also specify another Image as the source. You can create and insert aWindows installation mediaand use it as the source.
Follow these steps to learn how to run an online DISM:
To use a specific Windows image as a source, utilize the following command:
DISM /Online /Cleanup-Image /RestoreHealth /source: <drive_letter>\sources\install /LimitAccess
Here, replace<drive_letter>with the letter of the drive containing the source image.
While online DISM targets the current operating system, offline DISM targets a specific Windows image. You will have to specify the path to the partition that holds your operating system as the target image.