In this article, we want to teach you to Repair Windows with the DISM command.
Many of these errors are related to the corruption of a simple file in Windows. It affects the performance of your service and Windows.
The DISM stands for Deployment Image Servicing and Management Command.
It is a command for optimizing and customizing Windows, which has the ability to repair Windows.
In pre-family Windows 10, the SFC command was more useful. With the introduction of Windows 10, the use of this command does not work as before, and Microsoft has suggested the DISM command for this purpose.
Repair Windows with the DISM command
First, you need to open a PowerShell or CMD terminal with Administrator access.
The first step in repairing anything is to troubleshoot that system.
You can enter the DISM command with the following parameter to troubleshoot Windows first:
DISM /Online /Cleanup-Image /CheckHealth
The above command prompts DISM to check the status of Windows errors and find the corrupted files.
After entering this command, DISM will go to the Error logs and start searching among them.
Another parameter that you can use to troubleshoot your Windows is the Scanhealth parameter:
DISM /Online /Cleanup-Image /Scanhealth
This parameter does not only search for log files but will automatically start checking all Windows files and will find any Windows-related errors.
Note: Because of checking each Windows file, this command may take between 10 and 15 minutes.
To fix Windows problems with the DISM command, there is a parameter called Restorehealth.
You can use it as the following command:
DISM /Online /Cleanup-Image /Restorehealth
With this command, Windows start to recover and replace the corrupted files with healthy files.
Note: The DISM command will start downloading the required files using the Windows Update service.
This operation will fail if you have disabled the Windows Update service or the Internet is not available.
Note: Depending on the size and number of files destroyed, this operation may take some time and sometimes stop at a certain percentage in the progress bar.
If the problem occurs, the system will not hang on to a specific number and will show you an error.
Now we want to teach you to source the required DISM files from the local source instead of the Internet.
If you do not have Internet access, you can use another source.
Change the source of the DISM command from the Internet to media
The DISM command has a feature that can find files from different sources and repair Windows from them.
Sources such as DVDs, flash drives, or even Windows ISO files can be read for DISM.
To modify or add another source to the DISM command you can use the source parameter:
DISM /Online /Cleanup-Image /Restorehealth /Source:G:\Sources\install.esd
To specify the source, you should enter the address of the Install.esd or Install.win or Install.wsm files, which are the main Windows installation file.
Also, note that there will generally be one of three files in each media.
Note: To recover the corrupted files in Windows from the local source, your Windows version should be completely equal to the media version.
With the above command, you are able to introduce a specific resource to the DISM command, but the DISM command will go back to other resources if you wish.
If you want the DISM command to use only the source mentioned, you also need to enter the limitaccess parameter at the end of your commands:
DISM /Online /Cleanup-Image /Restorehealth /Source:G:\Sources\install.esd /Limitaccess
At this point, you are able to use the DISM command to troubleshoot and fix your Windows problems, and you will be able to reinstall Windows, etc.
Hope you enjoy this article about Repair Windows with the DISM command from the Windows Tutorials.