Server Manager both Roles and Features display Error HRESULT: 0x800F0818

Issue:

When you open Server Manager both Roles and Features display Error and you are unable to add any role or features. When you select the details link it displays error: HRESULT: 0x800F0818.

You also get the following error in the event log:  

 Log Name: Microsoft-Windows-ServerManager/Operational
Source: Microsoft-Windows-ServerManager
Date: 10/23/2011 11:35:43 AM
Event ID: 1601
Task Category: None
Level: Error
Keywords:     
User:        

Computer:    

Description:
Could not discover the state of the system. An unexpected exception was found:
System.Runtime.InteropServices.COMException (0x800F0818):
Exception from HRESULT: 0x800F0818
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)

 Action:

1. Browse to c:\Windows\Logs\CBS\
2. Copy the CBS.log to c:\Temp
3. Search the file for errors: corruption or failed

Example:

2012-01-10 19:47:55, Info CBS Mark store corruption flag because there is a
mismatch between package identity package:
Package_for_KB2511455_RTM~31bf3856ad364e35~amd64~~6.1.1.0.
[HRESULT= 0x00000000 - S_OK] 2012-01-10 19:47:55, Info CBS Identity mismatch:
Specified Identity:Package_for_KB2511455_RTM~31bf3856ad364e35~amd64~~6.1.1.0,
actual package Identity:
Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.1.7600.16385
[HRESULT = 0x800f0818 - CBS_E_IDENTITY_MISMATCH] 2012-01-10 19:47:55, Info
CBS Failed to resolve package [HRESULT = 0x800f0818 - CBS_E_IDENTITY_MISMATCH]

 

4. The above highlighted text above indicates that there is an issue with KB2511455. Once you find the corrupt Package you want to look for the KB number. The key information from the log is the below error string.

package_for_KB2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.

5. You may have more than 1 corrupt corrupt package. After you identify all the corrupt packages download each of the KB's.

6. Unpack the KB’s using the following command:

Expand -F:* UpdateKBXXXX.msu c:\Temp\KBXXXX_Unpackage

7. After you expand the file you will see UpdateKBXXXX.cab File. Expand it as well using the following command: “Right-click cmd click Run as administrator”

Expand -F:* UpdateKBXXXX.CAB c:\Temp\KBXXXX_Unpackage\CAB

8. You now need access to the c:\Windows\Servicing\Packages folder. In order to do this use the following commands:

takeown /F c:\Windows\Servicing\Packages /D y /R

9. Give your account full control of the folder: You can use windows explorer to give your account full control to the folder or use

cacls c:\Windows\Servicing\Packages /E /T /C /G "UserName":F

10. Rename the corrupt files both the .cat and .mum Example:

Current file name:

package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.cat

package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.mum

Rename file name:

_package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.cat

_package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.mum

11. Copy the unpackaged files from step 8 to c:\Windows\Servicing\Packages

Example:

You need both the .mum and .cat files

package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.cat

package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.mum

12. Server Manager should open as expected now.