Page 1 of 55 1231151 ... LastLast
    Use DISM to Repair Windows 10 Image

    Use DISM to Repair Windows 10 Image

    How to Repair Windows 10 Image using DISM
    Published by Category: Performance & Maintenance
    22 Aug 2017
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 25,705

    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


    Tip   Tip
    Until May 19th 2017, there was a problem in the Creators Update (version 1703, build 15063) with DISM reporting corruption and unable to repair it. This was fixed by Microsoft updating something on their servers that was causing DISM to fail with 'source not found' when it tried to refer to it.

    See: KB4016871 Fixes Spurious Win10 DISM Issue - Windows Enterprise Desktop



    How to fix Windows Error Code 0x800f081f - “The source files could not be found" for DISM

    and

    Creators update component store shows corruption but unable to repair - Page 3 - - Windows 10 Forums



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





    Use DISM to Repair Windows 10 Image OPTION ONE Use DISM to 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

    Name:  DISM_CheckHealth.png
Views: 152522
Size:  19.0 KB


     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

    Name:  DISM_ScanHealth.png
Views: 150314
Size:  19.6 KB


     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

    Name:  DISM_RestoreHealth.png
Views: 150632
Size:  20.0 KB


     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 file.

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


    A) Use steps 1-4 in the tutorial below to verify if this Windows 10 ISO file has install.wim and what the index number is for your edition of Windows 10.
    B) 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:<Index Number>

    OR

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

    Note   Note
    Substitute <Index Number> in the command below with the actual index number (ex: "1") for the edition (ex: "Pro") you want details about from step 6A above.

    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:	4575 
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 ONE 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) Use steps 1-4 in the tutorial below to verify if this Windows 10 ISO file has install.esd and what the index number is for your edition of Windows 10.
    B) 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:<Index Number>

    OR

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

    Note   Note
    Substitute <Index Number> in the command below with the actual index number (ex: "1") for the edition (ex: "Pro") you want details about from step 7A above.

    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:	6161 
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.






    Use DISM to Repair Windows 10 Image OPTION TWO Use DISM to 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

    Name:  PowerShell_Repair-WindowsImage_CheckHealth.png
Views: 149027
Size:  15.4 KB


     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

    Name:  PowerShell_Repair-WindowsImage_ScanHealth.png
Views: 149023
Size:  15.4 KB


     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

    Name:  PowerShell_Repair-WindowsImage_RestoreHealth.png
Views: 148661
Size:  14.3 KB


     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 file.

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


    A) Use steps 1-4 in the tutorial below to verify if this Windows 10 ISO file has install.esd and what the index number is for your edition of Windows 10.
    B) 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:<Index Number>

    OR

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

    Note   Note
    Substitute <Index Number> in the command below with the actual index number (ex: "1") for the edition (ex: "Pro") you want details about from step 6A above.

    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:	3580 
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 ONE 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:<Index Number>

    OR

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

    Note   Note
    Substitute <Index Number> in the command below with the actual index number (ex: "1") for the edition (ex: "Pro") you want details about from step 7A above.

    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:	2173 
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 : 548
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    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 ComputerSystem Spec
  2.    18 Jul 2015 #2
    Join Date : Oct 2013
    Posts : 25,705
    64-bit Windows 10 Pro build 17046
    Thread Starter

    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 ComputersSystem Spec
  3.    18 Jul 2015 #3
    Join Date : Jun 2015
    Posts : 548
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    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:	3667 
Size:	24.0 KB 
ID:	24985

    Name:  2.PNG
Views: 539330
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:	2206 
Size:	43.3 KB 
ID:	24987
      My ComputerSystem Spec
  4.    18 Jul 2015 #4
    Join Date : Oct 2013
    Posts : 25,705
    64-bit Windows 10 Pro build 17046
    Thread Starter

    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 ComputersSystem Spec
  5.    18 Jul 2015 #5
    Join Date : Jun 2015
    Posts : 548
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    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:	2081 
Size:	150.5 KB 
ID:	24994


    Click image for larger version. 

Name:	5.png 
Views:	1571 
Size:	42.3 KB 
ID:	24995
      My ComputerSystem Spec
  6.    18 Jul 2015 #6
    Join Date : Oct 2013
    Posts : 25,705
    64-bit Windows 10 Pro build 17046
    Thread Starter

    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 ComputersSystem Spec
  7.    18 Jul 2015 #7
    Join Date : Jun 2015
    Posts : 548
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    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:	2720 
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 ComputerSystem Spec
  8.    18 Jul 2015 #8
    Join Date : Oct 2013
    Posts : 25,705
    64-bit Windows 10 Pro build 17046
    Thread Starter

    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 ComputersSystem Spec
  9.    18 Jul 2015 #9
    Join Date : Jun 2015
    Posts : 548
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    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 ComputerSystem Spec

 
Page 1 of 55 1231151 ... 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 Upgrade
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 02:32.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums