DISM stands for Deployment Image Servicing and Management. When we look up at the previous Windows Operating Systems, we came across different kinds of issues and sometimes the Windows image file itself becomes un-serviceable. System File Checker helps to identify the corrupted files in the Windows System Files and repair them. But what if the SFC itself fails to perform the scan and detect the errors? What is DISM and how to use DISM in Windows 10?
Windows 10 comes with an extremely helpful command line utility known as Deployment Image Servicing and Management (DISM). As an overview, DISM is used when the SFC scan command is unable to repair corrupted System Files. By performing the DISM repair, the SFC scan commands should be working fine.
DISM comes installed by default on Windows 10 and Windows 8.1 Operating Systems and is used to repair damaged Windows Images, Windows Setup files etc.
How to use DISM to repair Windows 10?
Quick Note: Before proceeding with the troubleshooting steps, we suggest you to create a System Restore point. If something goes wrong during troubleshooting, you can restore your computer back to previous working state.
You can run the DISM tool using either the Command Prompt or the Windows PowerShell. The commands you use to run the DISM tool is similar in both the cases. So, it does not really matter which one you choose to run the DISM tool.
Running DISM/Cleanup-Image Tool in Command Prompt:
- Type cmd in the search box, right click on Command Prompt and select the option Run as Administrator.
2. Type the below command and hit enter to check if the Windows image has been flagged as corrupted by the Windows. If it is flagged, a confirmation can be shown if it can be repaired.
Dism /Online /Cleanup-Image /CheckHealth
Note: This command will not fix anything but gives you clear idea whether the corruption exists or not. With this, you will get an idea whether to continue with this whole process or not.
3. If the CheckHealth has showed any signs of corruption, it is recommended to do a wider scan on the image file. Below command, checks for component store corruption and records any of it in a log file. If you want to look over the log files, you can find them in C:\Windows\Logs\CBS\CBS.log or C:\Windows\Logs\DISM\dism.log.
Dism /Online /Cleanup-Image /ScanHealth
Note: /ScanHealth process will take around 10-20 minutes to complete. If the screen freezes during the process, please do not close it. Sit back and relax. Let the process to complete.
4. Use the below command line to scan the image for corruption, perform repair operations automatically and record any signs of corruption to the log file. Depending on your system specification and image size, this operation can take anywhere from 20 minutes to 4 hours or sometimes more.
Dism /Online /Cleanup-Image /RestoreHealth
Note: This process also takes a while to complete as mentioned. Sometimes, it may appear as the process is frozen. Do not close the command prompt. Just wait for it to complete.
Once the process is completed, it shows as Task completed successfully. Reboot your computer and Windows Image and the Corrupted System files should be repaired and the Windows should work fine from now.
Running DISM/Cleanup-Image Tool in Windows PowerShell:
Below steps, guide you to run the DISM tool using the Windows PowerShell tool.
- Type PowerShell in the Windows search box, right click on the Windows PowerShell and select option Run as Administrator.
- Type the below command in the PowerShell and hit enter.
Repair-WindowsImage -Online –CheckHealth
Note: The purpose of this command is to check whether the image has been flagged as corrupted by your system. It does not fix anything, but serves as a quick way to check if corruption exists. If you want to look over the log files, you can find them in C:\Windows\Logs\CBS\CBS.log or C:\Windows\Logs\DISM\dism.log.
3. Use the below command in the elevated PowerShell and hit enter to check for the corruption in the image file.
Repair-WindowsImage -Online –ScanHealth
Note: This command will check for the corrupted files and make a record of it in the log files.
4. To fix the corrupted files detected and saved in the log file, use the below command and hit enter.
Repair-WindowsImage -Online –RestoreHealth
Note: This task may take around 15 minutes to few hours depending on the System Specifications. Sometimes, the screen may also appears to be freeze. Do not interrupt the process.
Once it is done, reboot your computer. Windows image errors should be fixed and everything should work fine in your computer from now on.
Hope you have learned how to use DISM tool to repair corrupted files in Windows 10 computers. If you need further help, do comments below.