Page 1 of 29 12311 ... LastLast
    DISM - Repair Windows 10 Image

    DISM - Repair Windows 10 Image

    How to Repair Windows 10 Image using DISM
    Published by Brink
    04 Jul 2015

    Published by


    Brink's Avatar
    Administrator

    Posts: 14,311

    Show Printable Version 


    How to Repair Windows 10 Image using DISM

    information   Information
    If a Windows image becomes unserviceable, you can use the Deployment Imaging and Servicing Management (DISM) tool to update the files and correct the problem.

    For example, you would use DISM to fix Windows component store corruption when a sfc /scannow command is unable to repair corrupted or modified system files because the component store (source) is corrupted. SFC should be able to repair the files afterwards.

    For more information, see:


    This tutorial will show you how to do an Inbox Corruption Repair with the DISM /Cleanup-Image tool to fix component store corruption in Windows 10.

    You must be signed in as an administrator to be able to do an Inbox Corruption Repair with the Deployment Imaging and Servicing Management (DISM) tool.

    Note   Note
    The DISM /Cleanup-Image tool saves it's log files in the file locations below. To be able to view these logs, you would need to copy them from the locations below to your desktop, then open them from your desktop.

    C:\Windows\Logs\CBS\CBS.log

    C:\Windows\Logs\DISM\dism.log



    CONTENTS:
    • Option One: To Run "DISM /Cleanup-Image" Tool in Command Prompt
    • Option Two: To Run "DISM /Cleanup-Image" Tool in PowerShell






    DISM - Repair Windows 10 Image OPTION ONE DISM - Repair Windows 10 Image
    To Run "DISM /Cleanup-Image" Tool in Command Prompt

    1. Open an elevated command prompt.

    2. Do step3, step 4, step 5 (recommended), step 6, or step 7 below for what DISM command you would like to use.


     3. To Use DISM /CheckHealth Command

    Note   Note
    You would use /CheckHealth to only check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. This is just a quick way to see if corruption currently exists, and to inform you if there is corruption. This does not fix anything or create a log. This will finish running almost instantly.


    A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 8 below. (see screenshot below)

    Dism /Online /Cleanup-Image /CheckHealth

    Click image for larger version. 

Name:	DISM_CheckHealth.png 
Views:	3966 
Size:	19.0 KB 
ID:	23326


     4. To Use DISM /ScanHealth Command

    Note   Note
    You would use /ScanHealth to scan the image for component store corruption. This option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This can take around 5-10 minutes to finish. It will stay at 20% for a while before continuing.


    A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 8 below. (see screenshot below)

    Dism /Online /Cleanup-Image /ScanHealth

    Click image for larger version. 

Name:	DISM_ScanHealth.png 
Views:	2117 
Size:	19.6 KB 
ID:	23330


     5. To Use DISM /RestoreHealth Command

    Note   Note
    (recommended) You would use /RestoreHealth to scan the image for component store corruption, perform repair operations automatically, and records that corruption to the log file. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

    If this command fails, then you can do step 6 or step 7 below instead.


    A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 8 below. (see screenshot below)

    Dism /Online /Cleanup-Image /RestoreHealth

    Click image for larger version. 

Name:	DISM_RestoreHealth.png 
Views:	2206 
Size:	20.0 KB 
ID:	23327


     6. To Use DISM /RestoreHealth /Source:wim Command

    Note   Note
    You would use /Source with /RestoreHealth to specify the location of an install.wim file as the source of known good versions of files that can be used for the repair. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

    This can be useful if step 5 above was not able to repair the Windows image (component store).


    The install.wim file will be in the Sources folder of a mounted Windows 10 ISO from Microsoft Tech Bench (use ISO from OPTION ONE at link) file.

    If you have an install.esd file instead of install.wim, then you would need to use step 7 below instead.


    A) In the elevated command prompt, type the command below you want to use, press Enter, and go to step 8 below. (see screenshot below)

    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1

    OR

    (To prevent DISM from using Windows Update for online images)
    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1 /limitaccess

    For example:

    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /limitaccess

    Click image for larger version. 

Name:	DISM_RestoreHealth_wim_sources.png 
Views:	2675 
Size:	23.8 KB 
ID:	23329


     7. To Use DISM /RestoreHealth /Source:esd Command

    Note   Note
    You would use /Source with /RestoreHealth to specify the location of an install.esd file as the source of known good versions of files that can be used for the repair. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

    This can be useful if step 5 above was not able to repair the Windows image (component store).


    The install.esd file will be in the Sources folder of a mounted Windows 10 ISO from Media Creation Tool (use ISO from OPTION TWO at link) file.

    If you have an install.wim file instead of install.esd, then you would need to use step 6 above instead.


    A) In the elevated command prompt, type the command below you want to use, press Enter, and go to step 8 below. (see screenshot below)

    Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:Full Path to install.esd file:1

    OR

    (To prevent DISM from using Windows Update for online images)
    Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:Full Path to install.esd file:1 /limitaccess

    For example:

    Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:C:\$Windows.~BT\Sources\Install.esd:1 /limitaccess

    OR

    (USB from Media Creation Tool where E is drive letter of USB)
    Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:E:\Sources\Install.esd:1 /limitaccess

    Click image for larger version. 

Name:	DISM_RestoreHealth_esd_sources.png 
Views:	2525 
Size:	24.6 KB 
ID:	23328


    8. If you did step 5, step 6, or step 7 above, it is recommended to restart the computer to fully apply.






    DISM - Repair Windows 10 Image OPTION TWO DISM - Repair Windows 10 Image
    To Run "DISM /Cleanup-Image" Tool in PowerShell

    1. Open an elevated Windows PowerShell.

    2. Do step3, step 4, step 5 (recommended), step 6, or step 7 below for what DISM command you would like to use.


     3. To Use DISM /CheckHealth Command

    Note   Note
    You would use /CheckHealth to only check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. This is just a quick way to see if corruption currently exists, and to inform you if there is corruption. This does not fix anything or create a log. This will finish running almost instantly.


    A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 8 below. (see screenshot below)

    Repair-WindowsImage -Online -CheckHealth

    Click image for larger version. 

Name:	PowerShell_Repair-WindowsImage_CheckHealth.png 
Views:	1373 
Size:	15.4 KB 
ID:	23331


     4. To Use DISM /ScanHealth Command

    Note   Note
    You would use /ScanHealth to scan the image for component store corruption. This option does not fix any corruption. It only checks for component store corruption and records that corruption to the log file. This can take around 5-10 minutes to finish. It will stay at 20% for a while before continuing.


    A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 8 below. (see screenshot below)

    Repair-WindowsImage -Online -ScanHealth

    Click image for larger version. 

Name:	PowerShell_Repair-WindowsImage_ScanHealth.png 
Views:	861 
Size:	15.4 KB 
ID:	23333


     5. To Use DISM /RestoreHealth Command

    Note   Note
    (recommended) You would use /RestoreHealth to scan the image for component store corruption, perform repair operations automatically, and records that corruption to the log file. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

    If this command fails, then you can do step 6 or step 7 below instead.


    A) In the elevated command prompt, copy and paste the command below, press Enter, and go to step 8 below. (see screenshot below)

    Repair-WindowsImage -Online -RestoreHealth

    Click image for larger version. 

Name:	PowerShell_Repair-WindowsImage_RestoreHealth.png 
Views:	910 
Size:	14.3 KB 
ID:	23332


     6. To Use DISM /RestoreHealth /Source:wim Command

    Note   Note
    You would use /Source with /RestoreHealth to specify the location of an install.wim file as the source of known good versions of files that can be used for the repair. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

    This can be useful if step 5 above was not able to repair the Windows image (component store).


    The install.wim file will be in the Sources folder of a mounted Windows 10 ISO from Microsoft Tech Bench (Use ISO from OPTION ONE at link) file.

    If you have an install.esd file instead of install.wim, then you would need to use step 7 below instead.


    A) In the elevated command prompt, type the command below you want to use, press Enter, and go to step 8 below. (see screenshot below)

    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1

    OR

    (To prevent DISM from using Windows Update for online images)
    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:Full Path to install.wim file:1 /limitaccess

    For example:

    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /limitaccess


    Click image for larger version. 

Name:	PowerShell_DISM_RestoreHealth_wim_sources.png 
Views:	1274 
Size:	20.8 KB 
ID:	23340


     7. To Use DISM /RestoreHealth /Source:esd Command

    Note   Note
    You would use /Source with /RestoreHealth to specify the location of an install.esd file as the source of known good versions of files that can be used for the repair. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing.

    This can be useful if step 5 above was not able to repair the Windows image (component store).


    The install.esd file can be in the Sources folder of a mounted Windows 10 ISO from Media Creation Tool (Use ISO from OPTION TWO at link) file.

    If you have an install.wim file instead of install.esd, then you would need to use step 6 above instead.


    A) In the elevated command prompt, type the command below you want to use, press Enter, and go to step 8 below. (see screenshot below)

    Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:Full Path to install.esd file:1

    OR

    (To prevent DISM from using Windows Update for online images)
    Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:Full Path to install.esd file:1 /limitaccess

    For example:

    Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:C:\$Windows.~BT\Sources\Install.esd:1 /limitaccess

    Click image for larger version. 

Name:	PowerShell_DISM_RestoreHealth_esd_sources.png 
Views:	1043 
Size:	21.8 KB 
ID:	23339


    8. If you did step 5, step 6, or step 7 above, it is recommended to restart the computer to fully apply.


    That's it,
    Shawn


  1.    18 Jul 2015 #1
    Join Date : Jun 2015
    Posts : 381
    Windows 10 Pro 64bit; Windows 10 TP

    Hi

    I have an inquiry :

    If I wish "To Use DISM /RestoreHealth /Source:wim Command" (step 6) to restore the health of my 10240 installation, can I do this? Is it possible, I mean?

    And if I have the official 10162 ISO on my desktop, mounted so found on drive G: , which is the full path I should use?

    So, in my case the command is :
    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:G:\sources\install.wim:1 /limitaccess

    ?

    Because when I run it this way it says that it cannot find the Source..
      My System SpecsSystem Spec

  2.    18 Jul 2015 #2
    Join Date : Oct 2013
    Posts : 14,311
    64-bit Windows 10 Pro build 14901

    Hello Joanne,

    You can use the command below from step 5 option one to do so unless DISM is unable to repair the Windows image from the default source.

    Dism /Online /Cleanup-Image /RestoreHealth


    Since it says it can't find the specified source using step 6, your ISO may have been created with .esd instead of .wim. If so, give step 7 a try to see it works.
      My System SpecsSystem Spec

  3.    18 Jul 2015 #3
    Join Date : Jun 2015
    Posts : 381
    Windows 10 Pro 64bit; Windows 10 TP

    Thank you for your reply!

    Here is the result. Please advise me what to do next to repair my installation. I have the official 10162 ISO on my other SSD.

    Click image for larger version. 

Name:	1.png 
Views:	1327 
Size:	24.0 KB 
ID:	24985

    Name:  2.PNG
Views: 300311
Size:  17.3 KB

    Here is the reason I am trying this. Look how many times today's update has failed installing....

    Click image for larger version. 

Name:	3.png 
Views:	480 
Size:	43.3 KB 
ID:	24987
      My System SpecsSystem Spec

  4.    18 Jul 2015 #4
    Join Date : Oct 2013
    Posts : 14,311
    64-bit Windows 10 Pro build 14901

    Yep, in that case, use the command below to run the DISM command from the install.wim source on your G: drive.


    Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:G:\sources\install.wim:1 /limitaccess
      My System SpecsSystem Spec

  5.    18 Jul 2015 #5
    Join Date : Jun 2015
    Posts : 381
    Windows 10 Pro 64bit; Windows 10 TP

    I just did it but it cannot find the source files. I mounted the official 10162 ISO so the G:\ drive was created. Then I run the command. But it doesn't work.


    Click image for larger version. 

Name:	4.PNG 
Views:	1014 
Size:	150.5 KB 
ID:	24994


    Click image for larger version. 

Name:	5.png 
Views:	668 
Size:	42.3 KB 
ID:	24995
      My System SpecsSystem Spec

  6.    18 Jul 2015 #6
    Join Date : Oct 2013
    Posts : 14,311
    64-bit Windows 10 Pro build 14901

    In that case, run the commands in the order below one at a time.

    Dism.exe /online /Cleanup-Image /StartComponentCleanup

    sfc /scannow

    Dism /Online /Cleanup-Image /RestoreHealth

    sfc /scannow
      My System SpecsSystem Spec

  7.    18 Jul 2015 #7
    Join Date : Jun 2015
    Posts : 381
    Windows 10 Pro 64bit; Windows 10 TP

    Okay... I've run the 3 out of the 4 commands and...I have issues as it seems....

    Click image for larger version. 

Name:	2.png 
Views:	1008 
Size:	53.3 KB 
ID:	24999


    So, what can I do next, please?

    Thank you.

    PS: how can I upload the CBS log file, in case it's needed?
      My System SpecsSystem Spec

  8.    18 Jul 2015 #8
    Join Date : Oct 2013
    Posts : 14,311
    64-bit Windows 10 Pro build 14901

    In that case, you may need to refresh Windows 10 instead.

    To upload the CBS.log, you would need to copy it to your desktop first, ZIP it, then upload the ZIP.
      My System SpecsSystem Spec

  9.    18 Jul 2015 #9
    Join Date : Jun 2015
    Posts : 381
    Windows 10 Pro 64bit; Windows 10 TP

    Quote Originally Posted by Brink View Post
    In that case, you may need to refresh Windows 10 instead.

    To upload the CBS.log, you would need to copy it to your desktop first, ZIP it, then upload the ZIP.
    Thank you for your support, Brink!

    Please, allow me to ask you one simple question, before reading that entire tutorial :

    - I do not care at all what will happen with my Win 10 TP installation, I do not care wiping everything out of it - because I've not installed anything important- but what I DO care tremendously about is my Win 7 Home Premium installation, it being in a Dual boot system with 10, on this computer. So, I ask : this refreshing or whatever, can it affect my Win 7 in ANY way? Should I unplug my Win 7 SSD before attempting this refreshing?

    I would clean install this Win 10 for sure but it is this special occasion now. MS does not offer an official 10240 ISO. So clean-installing would bring me in waiting for 10240 again, etc etc...

    So?

    Oh! And one last thing... Until a couple of hours ago I was sitting with 10240 untouched, waiting to get updated. But I got bored so I performed a full Disk Cleanup, system files included, AND I have deleted all the files in the SoftwareDistribution/Downloads folder. Will this Refresh still work after all this?
      My System SpecsSystem Spec


 
Page 1 of 29 12311 ... LastLast


Similar Threads
Tutorial Category
SFC Scannow or DISM/RestoreHealth using Image
Windows 10 user. Having some trouble with my system after coming back from a weekend. Nothing major...just having trouble playing some games that require plugins etc Regardless if it's related, I just wanted to run an SFC/Scannow or...
Performance & Maintenance
How to repair your system files using Dism and Sfc in build 10041
Hello, everyone, I've managed to resolve most of my problems with build 10041 by making SFC work. I've opened a thread on Windows Insider's forums explaining how to do it. Check it out:...
Windows Insider
Windows 10 Crashing on CLASSPNP.SYS in safemode and startup repair.
I've just upgraded Windows 7 64-bit HP OEM to Windows 10 Technical preview 64-bit. Extracted the install while booted within 7, install went smoothly, opted to keep all my files, and once the install was finished it went to boot Windows 10. It hung...
General Support
W10 Disk Image Utility Reports Error After Image Creation.
I installed the 32 bit version of W10 on an old Acer laptop to get back up to speed with developments, and one of the first questions or issues that cropped up is when using W10's disk image utility to make a system image. I deliberately wished to...
General Support
Windows 10 TP Repair and Recovery Features
I'm currently running the 10 TP in a virtual machine. I see that the various boot and repair options can be accessed by <shift> Restart from the desktop, however F8 during boot doesn't appear to work. Can someone who is actually running this on...
Installation and Setup
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 17:24.
Find Us
Twitter Facebook Google+



Windows 10 Forums