How to Fix Windows 10 using DISM

Settings Gear Icon

If your Windows 10 became broken, it can be related to corruption in the Component Store where system files are stored. The Component store is a core feature of Windows 10 which stores all of the files related to the OS grouped by components and as hardlinks. Some files are shared between two components and they are all hardlinked to the system32 folder. When the OS is serviced, the component store is updated. The Component Store is part of the Windows Imaging and Servicing stack. In this article, we'll see how to fix Windows 10 if it cannot be updated or if certain system components are damaged.

There is a special console tool called DISM which ships with Windows 10 by default. It can be used to fix Windows Component Store corruption. It is especially useful when the usual command "sfc /scannow" cannot repair damaged system files.

Before you proceed, you need to know that the DISM tool writes the following log files:

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

They can be used to analyze errors and see completed operations.

To Fix Windows 10 using DISM, do the following.

  1. Open an elevated command prompt.
  2. Type or copy-paste the following command:
    Dism /Online /Cleanup-Image /CheckHealth

    The key option here is CheckHealth. Use it to check if some process has marked the Component Store as corrupted and whether the corruption is repairable. This command is not supposed to fix any issues. It only reports about problems if they are present and if the CBS store is flagged. This command doesn't create a log file.

  3. Alternatively, the command Dism /Online /Cleanup-Image /ScanHealth can be used to check the component store for corruption. It takes a significantly longer amount of time than the CheckHealth option, but creates a log file.
  4. Finally, to repair the component store, you should use the following command:
    Dism /Online /Cleanup-Image /RestoreHealth

    The DISM tool started with the /RestoreHealth option will scan the component store for corruption and perform the required repair operations automatically. It will create a log file. The whole process can take several hours, so be patient. On hard drives, it will take longer compared to an SSD.

In addition, you can specify the WIM file which can be used to restore corrupted system files. The command looks as follows:

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

In the command above, substitute the full path to the WIM file properly. Also, replace the <Index> portion in the command above with the actual index number for the edition contained in the WIM file.

For example,

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

You can list available editions and their indexes with the following command:

dism /get-wiminfo /wimfile:D:\sources\install.wim

Replace the D:\sources\ portion with the actual path to your WIM file.

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

6 thoughts on “How to Fix Windows 10 using DISM”

  1. Sergey, Is it also still possible to recover or restore Windows with my WIM file edited with a specific XML including account settings by using Dism /Online /Cleanup-Image /RestoreHealth? My another concern is — will my edited WIM File mess up with registry files due to other third-party programmes included? A few sentences of feedback would be much appreciated. Thank you very much! I’m from Hong Kong.

    Here is my actual XML file:
    (Before Sysprep, I manually changed the language settings and keyboard input settings. Then, in my XML file I chose “CopyProfile” during two phases —-> Specialize and oobeSystem. )



    Please enter your password.





  2. I run Windows 10 home 15063 but have previously run other versions. The last time I saw an \sources\install.wim file was 2 years or so ago. At present the file is install.esd. One can substitute that in the dism command. I just tried it and it worked.

    1. Huh? When I last time downloaded Windows 10 1703 .ISO image directly from Microsoft it came with .WIM file inside. .ESD is used often but definitely not as the only file format.

  3. A few months ago, when my Windows Update was broken, both SFC and Dism didn’t work with the latter complaining about not being able to download source files. I don’t recall how exactly I fixed this issue but I may have downloaded an image file of the build I was using back then. What I do know is that that period of time with the issue was nerve wrecking as literally no suggestions from the internet forums worked. I thought that I’ll be needing to reinstall / reset Windows and reinstall all the programs and tweaks again. I’m content that eventually I didn’t have to.

    1. MDJ, you are correct. I just downloaded an ISO and, sure enough, it contains an install.wim file. I made my other ISO from my own installation.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.