Server 2012 – Component stores is corrupt

dismwindows-server-2012winrm

I upgraded a Windows Server from 2008R2 to 2012 and now it has various services failing to start – eg winrm, iis. I know I should tell it to rebuild but the server doesn't actually use any of these services. In the future they might so is there a way to repair the image?

When I run PS C:\Windows\system32> Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:E:\sources\install.wim:1 /limitaccess

Deployment Image Servicing and Management tool
Version: 6.2.9200.16384

Image Version: 6.2.9200.16384

[==========================100.0%==========================]

Error: 14098

The component store has been corrupted.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

Does anyone know how to repair or replace the component store?

Best Answer

Store corruption sucks! If you can afford it, it's best to reinstall the OS. If not, you're going to go down a rabbit hole of patches at best or get really frustrated trying at worst. Here's my experience:

  • Dism /Online /Cleanup-Image /ScanHealth then check that C:\Windows\Logs\DISM\dism.log for anything interesting. For me it says go look at C:\Windows\Logs\CBS\CBS.log for details
  • C:\Windows\Logs\CBS\CBS.log indicates corruption with a package for a particular KB.
  • Go download the indicated KB from Windows Catalog and try to manually install. With any luck it'll install and you'll be able to install the original update or complete your scan successfully. Probably not though:
  • If you get "This update is not applicable to your computer", go check the CBS.log for the next corrupt package and keep trying to install those updates until you're good to go. If not:
  • If the updates gets stuck on "scanning for updates for your computer" for a long time, you can use net stop wuauserv and net stop trustedinstaller a few times (make sure they STAY stopped, they like to star themselves) and try again.
  • If trying again doesn't work, try a windows update check. If it says no updates, go try Dism /Online /Cleanup-Image /ScanHealth again and go check cbs.log for the next updates.
  • If DISM comes back clean, try sfc /scannow. If that's clean, you should hopefully be okay.

Just keep trying combinations of above until you get something. You may need to try Dism /Online /Cleanup-Image /RestoreHealth or Dism /Online /Cleanup-Image /RestoreHealth /source:d:\sources /limitaccess if you're offline and mount the Windows Install ISO/disk to d: (or swap letter).

Throw in a pinch of rebooting and some chicken bones and Bob's your uncle. Best of luck!