Skip to main content

How to use DISM command tool to repair Windows 10 image

Windows 10 DISM and SFC repair
Windows 10 DISM and SFC repair (Image credit: Windows Central)

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

Source: Windows Central (Image credit: Source: 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

Source: Windows Central (Image credit: Source: 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 /RestoreHealthQuick note: If the command appears stuck, this is normal behavior. After a few minutes, the process will complete successfully.

Source: Windows Central (Image credit: Source: Windows Central)

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.

Source: Windows Central (Image credit: Source: Windows Central)
  1. Click the Next button.
  2. Click the Next button again.

Source: Windows Central (Image credit: Source: Windows Central)
  1. Select the ISO file option.

Source: Windows Central (Image credit: Source: Windows Central)
  1. Click the Next button.
  2. Select the destination to store the Windows 10 ISO file.
  3. Click the Save button.
  4. Click the link to open the file location with File Explorer.

Source: Windows Central (Image credit: Source: Windows Central)
  1. Click the Finish button.
  2. Double-click the Windows.iso file to mount the image.
  3. Under the "This PC" section, confirm the drive letter for the mount point.

Source: Windows Central (Image credit: Source: 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:\Sources\install.wimIn the command, replace "F" with the ISO mount point drive letter in File Explorer.

Source: Windows Central (Image credit: Source: Windows Central)
  1. (Optional) Type the following command to limit the use of Windows Update and press Enter:DISM /Online /Cleanup-Image /RestoreHealth /Source:E\Sources\install.wim /LimitAccess
  2. (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:\Sources\install.wim:1 /LimitAccessIn 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:\ESD\Windows\sources\install.esdIn the command, change C:\ESD\Windows\sources with the path to the location of the ".esd" file (if different).

Source: Windows Central (Image credit: Source: Windows Central)
  1. (Optional) Type the following command to limit the use of Windows Update and press Enter:DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\ESD\Windows\sources\install.esd /LimitAccess
  2. (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:\ESD\Windows\sources\install.esd:1 /LimitAccess
  3. (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:\Sources\install.esdIn 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 /scannowQuick tip: If errors are found, you may want to run the command around three times to ensure that everything was fixed correctly.

Source: Windows Central (Image credit: Source: Windows Central)

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%\Logs\DISM\dism.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:

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

76 Comments
  • Thanks... this may become handy one day. Used SFC before but not DISM. I'm sure DISM will be another fascinating tool.
  • I appreciate the effort put into this article, but I don't understand why all solutons posted online to this problem assume that you want to fix a Windows 10 computer that won't boot on a computer that is booted into Windows.   Shouldn't the assumption be that if you can't boot a computer to windows, you can't do this from within Windows?   In my case, windows is not on line.  So how do I run DSIM if windows is not online?  
  • Never tested this out, but you can boot to Windows from installation media. It loads a preboot windows environment that this may work from then as I'm fairly certain you can get a command line.
  • Ok thanks, I didn't get a word, which is sad because I work in IT, but I'll save the article :)
  • Here's the short version: Use SFC, if that doesn't fix it, use DISM to fix the files that SFC uses to fix Windows 10, then try SFC again to fix the problem. Thanks,
  • It's "repair" and not "repair"
  • Sorry... Autocorrect did it again... "repairSource" and not "repiarSource"
  • Fixed. Thanks for catching that.
  • +1
  • Good stuff, I will save this article also.
  • How do you save article in windows central for wp 10 Sent from Lumia 550, HTC Desire 816 or Dell Inspiron 5122
  • I would like to rapair the email app. It stop to open and I don't know the reason. I cannot restore the whole pc because one app. Do you guys know what I can do to solve this problem?
  • Follow the instructions on this WC article to reinstall Mail & Calendar http://www.windowscentral.com/how-fix-mail-calendar-people-windows-10-pr...
  • I had the email app not do anything for a couple of months, it would always be blank when I opened it and do nothing wheni clicked on anything. Reinstalled it manually with powershell and still didn't work. Problem ended up being permissions in settings. Make sure the mail app is allowed to use email under the privacy settings.
  • a)   format drive C: and do a clean install b)   download Thunderbird and use it as your e-mail client
           less shiny but more practical   The mail app does not seem to be fully finished,
    at times it does not behave as it should. I am actually fairly tired of it.
    ​    
  • From my experience, you need to download an ISO image from Tech Bench - an image from the Media Creation Tool won't work.
  • Depends on what you're going to use it for. You can tell it to use an online source
  • That doesn't work either, actually - the scan won't go beyond 40%. I know I'm not the only one with this issue, too.
  • Yeah my experience with dism is kind of terrible to be honest. After a long time of troubleshooting and not being able to get it to fix windows on a surface Pro 3, had to just format and reinstall windows. Especially since it couldn't boot into Windows at all to go online. Even using an iso of Windows, it wouldn't fix it. Posted via the Windows Central App for Android
  • Which ISO did you use? There are two ISOs one for the general win 10 (3.6GB) and the other made for the Surface line (3.3GB) (though I don't know the difference) maybe you should have tried the one made for the latter. It did work for me
  • All the commands you see in the article were done using and install media created using the Media Creation Tool and they all reach 100% successfully. The commands were also tested with the install.wim and install.esd. Thanks,
  • Then there may be an issue with installations in other languages?
  • My suggestion would always be: Get a US version and apply language packs. Never had any issues using DISM as long as you use the the tool properly.
  • I tried using MCT media but I got nothing but errors and the job would never complete. I've been dealing with that problem for months on end! I downloaded the Tech Bench ISO AND the DISM (and thus, concurrently, the SFC) *FINALLY* did its d*mn job.
  • I have tried using both MCT and TechBench, and in both cases the commands worked flawlessly, but I'm glad that you found one that worked. I have updated the article to reflect that you can also use TechBench to download the Windows 10 ISO, which might help other people as well. Thanks,
  • I'm having issues with the store, it doesn't start. I have tried this but nothing seems to work, no Gears of War to Download.
  • The store started doing the same thing under my son's account. I tried to rename his profile and create a new one, but I couldn't rename it, even after killing all tasks and services possible. Resetting the PC while keeping files didn't work (failed to reset) and MS support was completely useless during the whole process of trying to fix the problem. I needed up reimaging the entire machine, all because one app, the store, wouldn't open.
  • There isn't anything that fixes the store when it gets into a funk. What's worse is that pretty much all the fixes on the internet are based on older builds of W10 and if you use them they do more damage. I got over 30 updates on apps that I couldn't install, got fed up and blew away my install to start fresh. When you combine W10 and SP3 it is the buggiest OS I've ever used, yet it works like a charm on my old XPS 12 Duo.
  • @R0bR. Yup, there isn't anyway to reinstall the store when the restore points, dism and sfc tools fail. Your only option is to reinstall the o/s or revert to a previous disk image.
  • I think the powershell command is what fixes it
  • Thanks for the tips. I feel ready for my MS certification exam. Here's hoping I didn't waste 100 bucks by basing all my answers on this one article. I jest. But this is good to know. :) "Suck gas evildoers!"
  • Too many "repiar"
  • Ya, repiar even in its command line. Fatal !
  • How to fix STORE? I lost it forever :( Power shell has ruined it. Or im just simply a noob.
  • what? there is no way to delete the store or lose it. That is, unless you're on W10 Server or W10 Pro
  • If you're using an anti-virus or security suite that has any kind of active file system protection, you might want to consider going into the options menu to temporariliy turn off the file system protection as it might interfere with either DISM or SFC while they're running.
  • You lost me at DISM +640/Win10
  • My surface P4 had issues from the start. Mail and store app crashed. Sfc didn't work. Restore twice with no luck. Ran ccleaner and everything I working perfect now.
  • A very useful article. Thanks to windows central
  • Excellent article
  • I knew about the DISM tool, and I have used it before, but I was never too sure how to use it to its full potential.  It can be a bit scary for some of us to do this kind of stuff.  Thanks Windows Central for clearing things up and making this less threatening for us common folk.  :)
  • DISM is the defacto tool to manage any Windows installation, either already installed or still on a USB stick waiting to be installed. It is used to deploy and customize your Windows installations since Windows Vista. It is used by SCCM and MDT to inject virtually anything that has a direct relation to Windows: Drivers, patches, language packs, the works. You can also use it to pre-enable Windows Features at installation, and to get rid of idiotic features such als XPS printers and Fax. Golden tool. Couldn't survive without it. ;)
  • Sent from Lumia 550, HTC Desire 816 or Dell Inspiron 5122
  • Little offtopic, but I have problem with folder, Google drive created folder in my harddrive and I cannot delete it because "I have no permission" thanks google!
  • Is it an actual folder, or just a hard link? Have you tried taking ownership of the folder?
  • It is folder, it contains some stuff from my gdrive. Yes tried many times taking the ownership. This folder has been bain in the a for long time now, im giving this pc away so I want to get rid of that folder. Stupid gdrive, using one drive nowdays.
  • DISM was not introduced with Windows 8 as the article says, nor Vista as a previous comment stated. It was introduced with Windows 7/2008R2. It combines and/or replaces functionality from various deprecated tools like pkgmgr and imagex. https://msdn.microsoft.com/en-us/library/windows/desktop/dd371719(v=vs.85).aspx
  • It most definitely was introduced in Vista (SP1 to be exact), but just not integrated in the OS. That was the case in Windows 7. The DISM versions in Windows 8 and up, just no longer support Vista. It has been part of WinPE for much, much longer than Windows 8.
  • I am sorry, but that is not technically true. The first version of DISM released with Win7 RTM had limited ability to be used on Vista SP1 and Server 2008 SP2, but only as a shim to call legacy tools like pkgmgr.exe. I have spent my career specializing in Windows deployment technologies like SCCM and MDT. I currently work as the Lead OS Engineer for a large national retailer with 10,000+ managed Windows instances. If you watch the logs during the WinPE driver injection step of an SCCM OSD task sequence for 2008 SP2 or Vista SP1, you will see DISM detect a down-leveled OS and call pkgmgr.exe to handle the work. No version of DISM was ever released natively for Vista/2008.
  • Can I have some help here please: I have downloaded the "windows.iso" file, right clicked and chose "mount". This created a D: drive (DVD) with the image. I looked into the \Sources subdirectory, could not find any "install.wim" file, but located the "install.esd" file - so far so good. However, when running the DISM restorehealth command directing it to the above install.esd file per article, after a while, it returned error saying that the source files could not be found! Any ideas please? 
  • . ​if it does not work for you or the way you use it does not result in a fix
    just do a clean install. Often this is the most economical solution.    
  • If an ISO created by the Media Creation tool doesn't work, you might need to download the uncompressed image file from the Tech Bech, here: https://www.windowscentral.com/e?link=https%3A%2F%2Fclick.linksynergy.co...
      You also might need to use this automated shell instead of the DISM and SFC tools by themseleves. : http://www.eightforums.com/performance-maintenance/68326-sfc-scannow-dis...
  • DISM is also present by default on Win7. The way the article is written is misleading. You can certainly service a Windows image on any desktop OS that is at least Win7 or Server OS that is at least 2008. Conversely, you can service a Win7 or any earlier OS image from a more recent OS like Win10.
  • Servicing an OS older than Win7 would require a DISM version different than the one in 8/8.1/10. You would need an appropriate version of Windows AIK, ADK or OPK.
  • You cannot manage all aspects of an OS earlier than Win7 from a more recent version of DISM included with Win8 or 10. Some items like driver injection are known to be broken as the legacy tools called to do the work by DISM are no longer compatible. The version included with WinPE 3.1 is reccomended for use on Vista SP1/2008 SP2. https://support.microsoft.com/en-us/kb/2853726
  • nice article   my experience with DISM:
    in most cases a fresh install is more effective
    and often costs less time. There are cases so stubborn that only formatting drive C
    and a fresh install does the job.
    You won't know why, but the job did get done. Trying to pinpoint problems
    and then trying to solve those can be quite tedious and time consuming. .
           
  • I completely agree. I always opt to do a fresh install whenever possible. I might spend a little more time, but I may avoid headaches later on. However, there are always cases, where you can't just do a clean install for a number of reasons. Thanks,
  • Yeah, don't know why do you always 95% of the time have to do this in Windows. I mean using my SP3 from a clean install and installing updates, doing an SFC and DISM always shows errors! Bummer
  • I desperately need a similar tutorial for fixing the image of my Windows 8.1. I am unable to upgrade to windows 10 becuase of it and whatever, I have tried has not worked so far. For most of the DISM commands namely: checkhealth, cleanupimage etc. I get a message that the command is not proper. These also don't get listed as options on pressing enter after I type DISM/Online/ Please help me out with it. P.s. I even have a third party app that claims to repair damaged registries, but it is a paid app and I don't wish to spend on it, as I am not sure if it will really work or not.
  • This didn't work for me, what worked for me was   Dism /Online /Cleanup-Image /RestoreHealth /Source:WIM:FILE DIRECTORY:1 /limitaccess
  • While the commands should work as shown in the article. I have also updated the guide to reflect the command variant to help other users that may come across your same issue. Thanks,
  • I have never gotten DISM to work with an esd and/or anything created with the media creation tool. Only the tech bench image with the .wim worked on my Surface Book. I'm glad to see this got posted, though, after the earlier article about SFC. These two go hand in hand.
  • Yeah, I just tried it with the .wim and it couldnt find the system files. I have always had to mount the install wim and point to the windows folder with an added \ at the end... But Im glad they covered this. Its pretty useful! :)
  • So can this fix the issues with Edge opening and closing immediately?  I tried the reg edit to change permissons on one key that fixed it until a reboot and cannot find a reliable fix (not that I use Edge much but come on...my Surface Book came with this issue out of the box!)
  • I am using the dism command using the original supplied MS installation DVD. The source information I supply is Source:E:\sources\install.wim but I keep getting an error message 0x800f081f . 'Use the "Source" option to specify the location of the files that are required to restore the feature' What am I doing wrong?
  • Misspelled. Replace Sources with Source.
  • Misspelled. Replace Sources with 'Source'.
  • Misspelled. Replace Sources with Source. https://www.youtube.com/channel/UC1Lrxap5OjbCUoZMl8VM00Q
  • Misspelled. Replace "SOURCES" with Source. https://www.youtube.com/channel/UC1Lrxap5OjbCUoZMl8VM00Q
  • Great write up. I will be sure to keep this in my toolbox for later use. Right now I am getting about 49.9% through before I get "Error 5 access is denied" when I run the restorehealth option. It makes no difference if I run it with the soruces or limitaccess added to the command.  Any suggestions
  • I'd like to point out a mistake in the article regarding the 'source' option. When one is using a recent ISO of Windows 10, the image contains a 'install.esd'. One must put that in the syntax along with the index number of the image. Hence the correct syntax would be: Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:Full Path to install.esd file:1 /limitaccess Or else you would always get a 'The source files could not be found' error.
  • What happened with Dr. Watson?
  • I found the correct version of my Windows 10 with WinPE inside the Windows APK package.  I'm assuming WinPE would have all of the appropriate tools/files to execute the /RestoreHealth function fully (for the same build).  What would be the "source" reference in the command though?  Thanks!
  • Sorry for the double-post, but also, simpler question, is there any point in running /CheckHealth  or /ScanHealth if you ran /RepairHealth?  Thanks again!
  • Three year old article. Anyway I prefer to just do an in place upgrade using the ISO image when I have Windows problems.
  • I was Apple only for 29 years. There was a command calling "running a fsck" that would both reveal corruptions and then, if run again, attempt to fix them. It was like an SFC and DISM Restore Health combined. What's fascinating, to me, is that neither system automates it. For instance, in Windows, why not have the system run this check after every cumulative or major update? And if it doesn't like what it sees, it runs the DISM itself? My experience has been that more than once a year the SFC finds something and every once in a while it needs the DISM to fix it. Turning this into a silly app or the system doing it by itself strikes me as fairly obvious.