Skip to content

Published: June 19, 2013 | Applies to:

This article will show you how to repair your Windows 8 installation and fix corrupted files using DISM commands.

Back to Windows Vista and Server editions, a potential fix for repairing the corruption on a system that we casually use is the CheckSUR. CheckSUR is commonly defined under System Update and Readiness Tool (KB947821). In Windows 8 and Windows Server 2012, the tool is renamed to Inbox Corruption Repair still the functionality remains same.

If you’re are not getting what I’m talking of, let me demonstrate you. Suppose, a package on your system becomes unserviceable. In general cases, Windows Updates provides the patches to repair the package. All this is done silently and the end user didn’t even notice it. However, if we want to fix the corrupted package on the basis of our own knowledge, then we need to use the Deployment Imaging and Servicing Management (DISM) tool instead via Windows Powershell or Command Prompt.

Using DISM, you can easily recover an unserviceable Windows Image. Add to these, DISM is powerful way to meet out the issues not solved by System File Checker (commonly used as SFC /SCANNOW command). In this article, I’ll show you how to do Inbox Corruption Repair using DISM, so without wasting anymore time, lets go…

FIX : Repair Your Windows 8 Using DISM Commands

1. Press  Windows Key + Q, type powershell, from results pick Windows PowerShell and right click over this result entry and select Run as administrator. In other words, you have to run Windows PowerShell as administrator, not as a user.

2. You can use following switches depending upon the requirements:

Command 1 :

Repair-WindowsImage -Online -CheckHealth : This switch option only checks to see if a component corruption marker is already present in the registry. It is just a quick way to see if corruption currently exists, and to inform you if there is corruption. It does not fix anything or create a log. This should be finished almost instantaneous.

Running Dism /Online /Cleanup-Image /CheckHealth in Command Prompt will also do the same job.

Command 2 :

Repair-WindowsImage -Online -ScanHealth : his checks to see if a component corruption marker is already present in the registry.  This is merely a way to see if corruption currently exists. This is could take almost 5 minutes to finish.

This operation can be executed using Dism /Online /Cleanup-Image /ScanHealth command in Command Prompt.

Command 3 :

Repair-WindowsImage -Online -RestoreHealth : This switch option checks for component store corruption, records the corruption to E:\WindowsLogs\CBS\CBS.log, and FIXES the image corruption using Windows Update. This should take around 10-15 minutes or more to finish depending on the level of corruption.

Executing command  Dism /Online /Cleanup-Image /RestoreHealth will do the same job as above.

To repair an online image using some of your own sources instead of Windows Update, type:

Dism /Online /Cleanup-Image /RestoreHealth /Source:c:testmountwindows /LimitAccess

If you do not specify a /Source for the repair files, the default location for Features on Demand is used. If you specify more than one /Source, the files are copied from the first location where they are found and the rest of the locations are ignored. You can use /LimitAccess to prevent the DISM tool from using Windows Update as a repair source or as a backup repair source for online images.

Other options to repair your Windows:

1. Repair using System Restore point.

2. Refresh your Windows 8 or later.

3. Reset your Windows 8 or later.

That’s it!


SHARE: Facebook Google+ Twitter

55 Comments

  • Hi, nice article! Could I print the logs recieved form the CBS?

  • Kapil Arya

    ^^ Yep, but after taking ownership of log file :)

  • DISM always overrides SFC. By inspection, I found this.

  • Everything worked great until I ran Repair-WindowsImage -Online -RestoreHealth. I continue to receive the error code 0x800f0906. Now what can I do? I don’t know what all got on theis computer, but I am determined to fix this computer “myself.”

    Thank you for your help.

  • Kapil Arya

    ^^ Try this: thewindowsclub.com/repair-corrupt-windows-image-error-0x800f0906

  • Unfortunately, fixing 0x800f0906 didn’t work.

    Since I’m using two different computers, I’ll type out what I received.

    Microsoft Windows [Version 6.2.9200]
    (c) 2012 Microsoft Corporation. All rights reserved.

    C:Windowssystem32>net stop wuauserv
    The service name is invalid.

    More help is available by typing NET HELPMSG 2185.

    C:Windowssystem32>
    C:Windowssystem32>cd %systemroot%SoftwareDistribution

    C:WindowsSoftwareDistribution>
    C:WindowsSoftwareDistribution>ren Download Download.old
    The system cannot find the file specified.

    C:WindowsSoftwareDistribution>
    C:WindowsSoftwareDistribution>net start wuauserv
    The service name is invalid.

    More help is available by typing NET HELPMSG 2185.

    C:WindowsSoftwareDistribution>
    C:WindowsSoftwareDistribution>net stop bits
    The service name is invalid.

    More help is available by typing NET HELPMSG 2185.

    C:WindowsSoftwareDistribution>
    C:WindowsSoftwareDistribution>net start bits
    The service name is invalid.

    More help is available by typing NET HELPMSG 2185.

    C:WindowsSoftwareDistribution>
    C:WindowsSoftwareDistribution>net stops cryptsvc
    The Cryptographic Services service is stopping..
    The Cryptographic Services service was stopped successfully.

    So I tried inputting NET HELPMSG 2185 and received the message The service name is invalid.

    Is there anything else I can try or should I give up the ghost and turn it in for help?

    Thank you again for your time and knowledge! It’s appreciated!

  • Kapil Arya

    ^^ You can try to Refresh:

    http://www.kapilarya.com/how-to-refresh-windows-8

  • THANK YOU!!!!! Success is mine.

  • bro i have a problem, i installed windows 8.1 pro, meanwhile i installed visual studio , later i uninstalled visual studio… then pc restarted, then windows 8.1 app are not opening, the apps shown like this AppexFinance,
    microsoft.Windowslive.Mail, and all game apps shows”APP”;; i want solution bro… plz

  • Kapil Arya

    ^^ I’ve posted a fix on this, read it here: thewindowsclub.com/windows-store-app-shortcuts-broken

  • arya …
    i did which u told to abk…
    after rebooting the pc.. the apps were delected…

  • Kapil Arya

    ^^ You can create a new user account and all apps will back :)

  • I am getting the following error when attempting to run any of the commands above:

    Windows PowerShell
    Copyright (C) 2013 Microsoft Corporation. All rights reserved.

    PS C:UsersDaniel> Repair-WindowsImage -Online -CheckHealth
    Repair-WindowsImage : The requested operation requires elevation.
    At line:1 char:1
    + Repair-WindowsImage -Online -CheckHealth
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

    Any ideas?

  • Kapil Arya

    ^^ You have to open Windows PowerShell as administrator not as user. I have re-updated step 1 for this, thanks for your inputs :)

  • I have a problem with windows update as it doesn’t work…after running powershell…it says my configuration registry datebase id corrupt….any fixing it?Cant receive any Microsoft updates…windows 8…runs defender is helpful?

  • I have a toshiba laptop with the new windows 8.1. Unfortunately I’ve got a load of viruses on it from a download and the only thing I can do is try to reset it to factory settings. As I don’t have the recovery disc (and would prefer to get it sorted without buying a new one).
    If I follow the steps above, will it wipe my laptop? Also, will I need to reinstall windows 8 afterwards and will I need the recovery media to do this anyway?
    Many thanks :)

  • Kapil Arya

    ^^ Nope, following the instructions made here will remove corruption from your system :) Hope you won’t need to go for reinstall.

    @Glen, Refer the suggestions:

    http://www.kapilarya.com/windows-updates-troubleshooting

  • I followed everything as it said here but at the last step i got this as a message… help?

    PS C:\WINDOWS\system32> Repair-WindowsImage -Online -RestoreHealth
    Repair-WindowsImage : The source files could not be downloaded.
    Use the “source” option to specify the location of the files that are required to restore the feature. For more
    information on specifying a source location, see go.microsoft.com/fwlink/?LinkId=243077.
    At line:1 char:1
    + Repair-WindowsImage -Online -RestoreHealth
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

  • Kapil Arya

    ^^ I’ve posted about it here, see if that helps: thewindowsclub.com/repair-corrupt-windows-image-error-0x800f0906

  • Hi everything else worked correctly but after I ran the Repair-WindowsImage -Online -RestoreHealth then it gives me the following message:
    Repair-WindowsImage : Repair-WindowsImage Failed. Error Code = 0x80240021
    At line:1 char:1
    + Repair-WindowsImage -Online -RestoreHealth
    +Categoryinfo : NotSpecified: [Repair-WindowsImage], COMException
    +FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

  • Kapil Arya

    ^^ See if running SFC /SCANNOW in administrative Command Prompt finds any integrity violations.

  • Okay so I just ran the scan and it says that it completed 100% and the following message was underneath it:

    Windows Resource Protection found corrupt files but was unable to fix some
    of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
    example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
    supported in offline servicing scenarios.

  • Kapil Arya

    ^^ Seems like some program on your system is conflicting these operations, because the error code you received earlier indicates timeout operation. I suggest you uninstall all the third-party software on your system and boot it into Safe Mode. Then run this Dism /Online /Cleanup-Image /StartComponentCleanup command first and then try the third command mentioned in the article. Then re-run SFC /SCANNOW and this time it should fix your system.

  • Hello Kapil,
    I used the info above to scan my computer, but when I entered the cmd as administrator, it is doing nothing but running. I entered Repair-WindowsImage -Online -ScanHealth

    It has: Repair-WindowsImage
    Running
    [oooooooooooooooooooooooooooo ]

  • Kapil Arya

    ^^ The command execution time depends upon the corruption of files on your system, so let it complete first. It should take around 10-15 minutes.

  • Hello Kapil,

    Hi everything else worked correctly but after I ran the Repair-WindowsImage -Online -RestoreHealth then it gives me the following message:
    Repair-WindowsImage : The restore operation failed. Either the repair source was not found or the component store cannot be repaired.
    At line:1 char:1
    + Repair-WindowsImage -Online -RestoreHealth
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairsWindowsImageCommand

  • Kapil Arya

    ^^ Most probably there exists no corruption on your system. You can also check this by SFC /SCANNOW command, you’ll recieve ‘there are no integrity voilatations’ message :)

  • Hey Kapil

    I’ve been having problems for a few weeks now with my laptop constantly using near to or 100 percent or my disc I searched for a while with no success and this has given me I think weird results and i dont know how to fix it

    PS C:\WINDOWS\system32> Repair-WindowsImage -Online -CheckHealth
    Repair-WindowsImage : A system shutdown is in progress.
    At line:1 char:1
    + Repair-WindowsImage -Online -CheckHealth
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

    it says a shutdown is in progress?? it says that pretty much in all methods you suggested…help.

  • Kapil Arya

    ^^ Have you tried SFC? What it reported you back?

  • Yeah I tried it yesterday and it said everything was fine, im about to try see if it runs fine in safe mode, it wont let me refresh windows either…im stumped

  • Kapil Arya

    ^^ Since SFC reported that everything is fine, you’re good to go! See this if you can’t Refresh: http://www.kapilarya.com/there-was-a-problem-refreshing-your-pc

  • im using windows powershell, but its taking forever. i wanted to restart my pc or do something about it just because my camera isn’t working it wont let me restart it from settings. i dont have any cd to help me with this problem and this is taking forever to do. i cant wait forever on this because i want to get this down soon as possible. a few weeks ago or more my computer warned me about a trojan. i did a trojan scan, malware scan, and a virus scan. my pc has been acting up ever since i`ve started used it. i didnt get my computer brand new. it was a used computer. i got it restarted just because the computer was extremely slow and kept on freezing. its much better now but i still have trouble with it not responding, sometimes freezing, and being slow.

  • Windows Update Troubleshooter produced “Root Cause of RC_DataStore, ErrorCode 0x80070057. I tried running ScanHealth and RestoreHealth at both Command Prompt and PowerShell. Both just hung up and provided no results. In PowerShell only Command 1 worked. Received:
    Operation
    Running
    [00000000000
    Online : False
    Image Health State : Repairable
    Restart Needed : False

    PS C:\Windows\system32>

    Any suggestions on what to do next? I am NOT techie, so this is challenging! Thanks for any help you can offer.

  • Kapil Arya

    ^^ Command 1 says that your system doesn’t needs to have corruption repair. Second thing is that you can try is to update Windows Components:

    http://www.kapilarya.com/windows-updates-troubleshooting

  • I have tried to Refresh my system but every time a message come out
    saying that …There was a problem refreshing your pc .
    And when i try to reset the system then there also a message comes saying that there was problem in resetting your pc

    Please give a solution
    I am using sony vaio and preinstalled windows 8 single language in it

  • Kapil Arya

    ^^ Here you go: http://www.kapilarya.com/there-was-a-problem-refreshing-your-pc

  • hi,

    I am trying the command 2 but always my system show the progress but not complete the command.

  • Kapil Arya

    ^^ It would be running in background for sure. Please keep patience or directly run third command if you want to restore your system image. That command too may take some time to execute, so you’ve wait for while.

  • Hi,
    How do I enable Windows Firewall when it gives me error code 2? I really need the service running so I can install a program.

  • Kapil Arya

    ^^ You can either try DISM commands mentioned here or use System File Checker to get fixed:

    http://www.kapilarya.com/how-to-use-system-file-checker-to-repair-windows

  • Hi. Endless automatic repair, and I can go into bios(or whatever) by klicking F8, also there is am option in the right down side of the screen that I can choose f 12 or f2 (I think), but I don’t know what to do, what option should I choose, without destroying my files. Thanks in advance

  • Kapil Arya

    ^^ You can proceed as directed here and see if it helps:

    http://www.kapilarya.com/fix-the-boot-configuration-data-file-is-missing-some-required-information

  • PS C:\windows\system32> Repair-WindowsImage -Online -RestoreHealth
    Repair-WindowsImage : The requested operation failed. A system reboot is required to roll back changes made.
    At line:1 char:1
    + Repair-WindowsImage -Online -RestoreHealth
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

    what should i do ? now

    \

  • Does this also work if I’m using windows 10? I had the error of mfc120u.dll is either not designed to run on windows or is corrupted

  • Kapil Arya

    ^^ Yep, it works on Windows 10. Try and see if it helps regarding the error you got. Else try this:

    http://www.kapilarya.com/the-program-cant-start-because-mfc100u-dll-is-missing-from-your-computer

  • Kapil – on Win 8.1 Desktop and new Laptop RepairHealth failed on both with the same error code 0x800f0906. sfc on both indicated corruption on sysprep. Appreciate any suggestions!
    Merwyn Bear

  • Kapil Arya

    ^^ Please let me know what error message you got with this code, so that I can help you further!

  • Hi Kapil, in advance thanks for this website.

    When I try to use PowerShell, it isn’t work. One can read the next message “powershell has stopped working”.
    So when I try to use Command Prompt and write this command “Dism /Online /Cleanup-Image /CheckHealth”, the system said: ‘ Error: 87. The Cleanup-Image option is unknown.’
    Then I try to run DISM.exe /? and I still don’t find this option.
    Could you help me please?

  • Kapil Arya

    ^^ Please check the command again, it should have spaces in between!

  • Thanks for you quickly answer, I really appreciate it.
    This is the complete message after I enter the command:
    Deployment Image Servicing and Management tool
    Version: 6.3.9600.17031
    Image Version: 6.3.9600.17031
    Error: 87
    The Cleanup-Image option is unknown.
    For more information, refer to the help by running DISM.exe /?.
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
    C:\WINDOWS\system32>

  • When I go to restore the files I am greeted by this jolly message:

    Repair-WindowsImage : The restore operation failed. Either the repair source was not found or the component store
    cannot be repaired.
    At line:1 char:1
    + Repair-WindowsImage -Online -RestoreHealth
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

    Does anyone know what this means and what I can do to fix it

  • Hi Kapil. I am having an issue with my pc.
    When i run your first test, it tells me my system is repairable.
    The next process is taking way longer than 5 minutes tho, and i have not yet been able to complete it.
    SFC also gets stuck on 100%.
    I don’t know what to do from here, thanks

  • Kapil Arya

    ^^ Go ahead with DISM commands :)

  • Ok, I tried each task ending with the “repairs windows image task”…..Here is the outcome and it doesn’t look promising, so can you please tell me what to do next. Thank you :)

    Repair-WindowsImage : The restore operation failed. Either the repair source was not found or the component store cannot be repaired.
    At line:1 char:1
    + Repair-WindowsImage -Online -RestoreHealth
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Repair-WindowsImage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RepairWindowsImageCommand

  • I just want to clarify the above message I sent was given in Administrator: Powershell
    I am assuming I still have corrupted files (or whatever) because when I ran some things in Command Prompt: Administrator, I got this:
    C:\WINDOWS\system32>sfc /SCANNOW

    Beginning system scan. This process will take some time.

    Beginning verification phase of system scan.
    Verification 100% complete.

    Windows Resource Protection found corrupt files but was unable to fix some
    of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
    example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
    supported in offline servicing scenarios.

    C:\WINDOWS\system32>
    C:\WINDOWS\system32>

    The above is what brought me to powershell and now powershell is saying that it could not find them or fix them, what do I do?

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    What's New


    Recent Comments

    • wrshepp : Neither one of you fixes worked! In fact it made it worse, n...

      6 hours ago

    • Kapil Arya : ^^ See if FIX 2 mentioned here helps you: http://www.kapilar...

      6 hours ago

    • Kapil Arya : ^^ Yes, already mentioned in article....

      6 hours ago

    • Daffa Ananda : When i disable ipv6, can i re-enable it?...

      8 hours ago

    • Balraj Chuhan : I am connecting my 20 or more pc with Homegroup. After join...

      24 hours ago


    Windows Group Policy Troubleshooting