How to use DISM command tool to repair Windows 10 image


    On Windows 10, the Deployment Image Servicing and Management is a command-line tool that allows administrators to prepare, modify, and repair system images, including Windows Recovery Environment, Windows Setup, and Windows PE (WinPE). However, you can also use it with the local recovery image to fix system problems.

    Typically, when you need to troubleshoot a specific error, figure out why the computer no longer boots correctly, or resolve performance issues, you can use the System File Checker tool to replace missing or corrupted system files using the recovery image. The caveat utilizing this approach is that if one or more Windows 10 files in the local image are damaged, the SFC command won’t work. In this scenario, you can use the “install.wim” image with DISM to repair the image and then use the SFC tool to fix the setup without having to reinstall Windows.

    In this Windows 10 guide, we will walk you through the steps to use the DISM and SFC tools to bring a computer back to a healthy working state without the need for reinstallation.

    Warning: The commands outlined in this guide are non-destructive, but since you will be making system changes, it is still recommended to create a temporary full backup before proceeding.

    How to use DISM to repair image of Windows 10

    On Windows 10, the DISM command tool includes three options to repair an image, including “CheckHealth,” “ScanHealth,” and “RestoreHealth,” which you want to use in order. Also, depending on the issue, you can use the “RestoreHealth” option to fix the locally available image using different source files.

    DISM command with CheckHealth option

    The CheckHealth option with the DISM tool allows you to determine any corruptions inside the local Windows 10 image. However, the option does not perform any repairs.

    To check the Windows 10 image for issues with DISM, use these steps:

    1. Open Start.
    2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
    3. Type the following command to perform a quick check and press Enter:

      DISM /Online /Cleanup-Image /CheckHealth

      DISM CheckHealthSource: Windows Central

    Once you complete the steps, the Deployment Image Servicing and Management tool will run and verify any data corruption that may require fixing.

    DISM command with ScanHealth option

    The ScanHealth option does a more advanced scan to find out whether the image has any problems.

    To check image problems with the ScanHealth option, use these steps:

    1. Open Start.
    2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
    3. Type the following command to perform an advanced DISM scan and press Enter:

      DISM /Online /Cleanup-Image /ScanHealth

      DISM ScanHealthSource: Windows Central

    After you complete the steps, the scan may take several minutes to check whether the Windows 10 image needs repairing.

    DISM command with RestoreHealth option

    If there are problems with the system image, use DISM with the RestoreHealth option to automatically scan and repair common issues.

    To repair Windows 10 image problems with the DISM command tool, use these steps:

    1. Open Start.
    2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
    3. Type the following command to repair the Windows 10 image and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth

      DISM RestoreHealth on Windows 10Source: Windows Central

      Quick note: If the command appears stuck, this is normal behavior. After a few minutes, the process will complete successfully.

    Once you complete the steps, the tool will connect to Windows Update online to download and replace damaged files (as necessary).

    Fix problems with DISM using install.wim image

    The Deployment Image Servicing and Management command usually doesn’t cause issues. However, if the tool finds problems replacing the damaged files or the computer isn’t connected to the internet, you will need to provide another image using the Source option. Typically, you can use an “install.wim” or “install.esd” file from another device, bootable install media, or Windows 10 ISO file. You only need to make sure that the files match the version, edition, and language of the version of Windows 10 you are trying to fix.

    Download Windows 10 ISO file

    If you need to use another file source, it is recommended to use the Media Creation Tool to download a fresh copy of Windows 10.

    To download the ISO file of Windows 10, use these steps:

    1. Open this Microsoft support website.
    2. Click the Download tool now button.
    3. Double-click the MediaCreationToolxxxx.exe file to launch the setup.
    4. Click the Accept button to agree to the terms.
    5. Select the Create installation media (USB flash drive, DVD, or ISO file) for another PC option.

      Media Creation Tool create media for another PCSource: Windows Central

    6. Click the Next button.
    7. Click the Next button again.

      Select language, architecture, and editionSource: Windows Central

    8. Select the ISO file option.

      Media Creation Tool ISO file optionSource: Windows Central

    9. Click the Next button.
    10. Select the destination to store the Windows 10 ISO file.
    11. Click the Save button.
    12. Click the link to open the file location with File Explorer.

      Open Windows 10 ISO locationSource: Windows Central

    13. Click the Finish button.
    14. Double-click the Windows.iso file to mount the image.
    15. Under the “This PC” section, confirm the drive letter for the mount point.

      Windows 10 ISO driver letterSource: Windows Central

    After you complete the steps, you can continue with the DISM tool using the “Source” option to repair the local image.

    Fix Windows 10 recovery image

    To run Deployment Image Servicing and Management tool with an alternate source (install.wim) image, use these steps:

    1. Open Start.
    2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
    3. Type the following command to repair the Windows 10 image and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth /Source:E:Sourcesinstall.wim

      DISM RestoreHealth with install.wim fileSource: Windows Central

      In the command, replace “F” with the ISO mount point drive letter in File Explorer.

    4. (Optional) Type the following command to limit the use of Windows Update and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth /Source:ESourcesinstall.wim /LimitAccess

    5. (Optional) Type the following variant of the previous command to accomplish the same task and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:E:Sourcesinstall.wim:1 /LimitAccess

      In the command, change E:Sources, for the path to the “install.wim” file.

    Once you complete the steps, the command will scan and repair the problems using the “install.wim” file you specified as the alternative source.

    Fix problems with DISM using ESD image

    If you have an encrypted “install.esd” image, it’s possible to use it to repair the damaged files on Windows 10.

    To use DISM with an “install.esd” image file as the source to repair Windows 10, use these steps:

    1. Open Start.
    2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
    3. Type the following command to repair the image with an “install.esd” file and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth /Source:C:ESDWindowssourcesinstall.esd

      DISM Restorehealth install.esdSource: Windows Central

      In the command, change C:ESDWindowssources with the path to the location of the “.esd” file (if different).

    4. (Optional) Type the following command to limit the use of Windows Update and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth /Source:C:ESDWindowssourcesinstall.esd /LimitAccess

    5. (Optional) Type the following variant of the previous command to accomplish the same task and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth /Source:esd:C:ESDWindowssourcesinstall.esd:1 /LimitAccess

    6. (Optional) Type the following command to use an install.esd file located in another drive and press Enter:

      DISM /Online /Cleanup-Image /RestoreHealth /Source:E:Sourcesinstall.esd

      In the command, replace E:Sources with the path to the location of the “install.esd” file.

    After you complete the steps, the tool will repair the damaged files using the files included in the “install.esd” image.

    How to run SFC to repair problems on Windows 10

    The above instructions will resolve problems with the system image, not the issues with the Windows 10 installation. After restoring the image to a healthy state, use the System File Checker (SFC) command tool to repair the current setup.

    To use the SFC command tool to repair Windows 10 problems, use these steps:

    1. Open Start.
    2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
    3. Type the following command to repair the installation and press Enter:

      SFC /scannow

      Windows 10 installation repair with SFCSource: Windows Central

      Quick tip: If errors are found, you may want to run the command around three times to ensure that everything was fixed correctly.

    Once you complete the steps, the System File Checker tool will repair the system files using the local image files, and the log files will be saved on %windir%/Logs/CBS/CBS.log and %windir%LogsDISMdism.log, which you can view to get more details about the process.

    You can use this guide to learn more ways to use the SFC tool to fix problems on Windows 10.

    More Windows resources

    For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:

    We may earn a commission for purchases using our links. Learn more.





    Source link

    Previous articleWhat’s new in movie theaters: The Outfit and X
    Next articleHow to Copy and Paste on iPhone