DISM or Deployment Imaging and Servicing Management tool allows you to repair Windows Images (.wim) or Virtual Hard Disk (.vhd and .vhdx). However, sometimes, they throw an error when trying to repair those files. In that case, we need to run DISK Offline to repair your system image backup, whether it is an external hard drive or Windows image backup, this method will work.
DISM is built into your Windows system, and you can access it easily from Windows PowerShell or Command Prompt. DISM commands vary based on the edition of Windows you want to serve and the state of the image (offline or online).
However, many users have experienced issues using the DSIM command-line tool to repair or prepare Windows 11/10 image backup on an external drive. They get the following error message when they attempt to operate:
The source files could not be found.
On this page, you will learn the correct way to run DISM on an external drive to repair Windows 11/10 image backup.
Run DISM Offline to repair Windows 11 System Image backup
First, run the following command:
Dism.exe /Online /CheckHealth
When you use the /CheckHealth argument, the DISM tool will report whether the image is healthy, repairable, or non-repairable.
- If the image is non-repairable, you should discard the image and start again.
- If the image is repairable, you can use the /RestoreHealth argument to repair the image.
If the DISM tool doesn’t work, then you have to clean up the Windows system components.
Press the Windows key and search for cmd. Right-click on Command Prompt and run it as an Administrator. In the Command Prompt window, type the following command and hit ENTER:
Dism.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows
NOTE: In the command above, substitute the C:\RepairSource\Windows
part with the actual location of the repair source.
Run DISM offline
If you are looking to repair an offline image with the use of a mounted image, you can use:
Dism /Image:C:\offline /Cleanup-Image /RestoreHealth /Source:C:\test\mount\windows
You could also use /LimitAccess
at the end to prevent the DISM tool from using Windows Update as a repair source or as a backup repair source for online images.
These simple commands will resolve the issue and successfully let you use DISM on external drives.
TIP: You can also fix corrupted Windows Update system files using DISM Tool.
How to repair Windows 11 image using DISM?
To repair your system image using DISM, you first need to open Command Prompt as an administrator. Once you have launched the application, run – Dism.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows
. The command will find the intact system image and then repair yours using it.
Also Read: Scan & repair a single file using System File Checker.