error_sxs_assembly_missing after trying to add the Web-WMI Feature using Powershell

NiclasRM 6 Reputation points
2022-06-15T08:35:19.337+00:00

Hi,
I want to install the Web-WMI Feature using the Powershell command 'Add-WindowsFeature Web-WMI'. This command fails with the error message

Add-WindowsFeature : The request to add or remove features on the specified server failed.  
Installation of one or more roles, role services, or features failed.  
The referenced assembly could not be found. Error: 0x80073701  
At line:1 char:1  
+ Add-WindowsFeature Web-WMI  
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~  
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exception  
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand  

What I found to solve the issue related to the error code ' 0x80073701', was to run sfc /scannow, DISM /Online /Cleanup-Image /RestoreHealth or DISM /Online /Cleanup-Image /Startcomponentcleanup. I tried all of them and non worked for me. Furthermore I checked the CBS.log file.

2022-06-15 08:13:10, Info                  CBS    Not able to add pending.xml to Windows Error Report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Info                  CBS    Not able to add pending.xml.bad to Windows Error Report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Info                  CBS    Not able to add poqexec.log to Windows Error Report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Info                  CBS    Not able to add SCM.EVM to Windows Error Report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Error                 CSI    00000009 (F) STATUS_SXS_ASSEMBLY_MISSING #772113# from CCSDirectTransaction::OperateEnding at index 0 of 1 operations, disposition 2[gle=0xd015000c]  
2022-06-15 08:13:10, Error                 CSI    0000000a (F) HRESULT_FROM_WIN32(ERROR_SXS_ASSEMBLY_MISSING) #771955# from Windows::ServicingAPI::CCSITransaction::ICSITransaction_PinDeployment(Flags = 0, a = 2110f239fa674556f61766e47d4765cd, version 10.0.17763.1697, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}, cb = (null), s = (null), rid = 'Package_3821_for_KB5001638~31bf3856ad364e35~amd64~~10.0.1.3.5001638-7457_neutral', rah = (null), manpath = (null), catpath = (null), ed = 0, disp = 0)[gle=0x80073701]  
2022-06-15 08:13:10, Info                  CBS    Failed to pin deployment while resolving Update: Package_3821_for_KB5001638~31bf3856ad364e35~amd64~~10.0.1.3.5001638-7457_neutral from file: (null) [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]  
2022-06-15 08:13:10, Info                  CBS    Failed to bulk stage deployment manifest and pin deployment for package:Package_1120_for_KB5013941~31bf3856ad364e35~amd64~~10.0.1.6 [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]  
2022-06-15 08:13:10, Info                  CBS    CommitPackagesState: Started persisting state of packages  
2022-06-15 08:13:10, Info                  CBS    CommitPackagesState: Completed persisting state of packages  
2022-06-15 08:13:10, Info                  CSI    0000000b@2022/6/15:08:13:10.821 CSI Transaction @0x17002d1edf0 destroyed  
2022-06-15 08:13:10, Info                  CBS    Perf: Resolve chain complete.  
2022-06-15 08:13:10, Info                  CBS    Failed to resolve execution chain. [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]  
2022-06-15 08:13:10, Error                 CBS    Failed to process single phase execution. [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]  
2022-06-15 08:13:10, Info                  CBS    WER: Generating failure report for package: Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.17763.1, status: 0x80073701, failure source: Resolve, start state: Installed, target state: Installed, client id: DISM Package Manager Provider  
2022-06-15 08:13:10, Info                  CBS    Not able to query DisableWerReporting flag.  Assuming not set... [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Info                  CBS    Added C:\Windows\Logs\CBS\CBS.log to WER report.  
2022-06-15 08:13:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20220615073645.log to WER report.  
2022-06-15 08:13:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20220615062628.log to WER report.  
2022-06-15 08:13:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20220614094334.log to WER report.  
2022-06-15 08:13:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20220614073306.log to WER report.  
2022-06-15 08:13:10, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20220614064240.log to WER report.  
2022-06-15 08:13:10, Info                  CBS    Not able to add %windir%\winsxs\poqexec.log to WER report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Info                  CBS    Not able to add %windir%\winsxs\pending.xml to WER report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Info                  CBS    Not able to add %windir%\winsxs\pending.xml.bad to WER report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]  
2022-06-15 08:13:10, Info                  CBS    Reboot mark cleared  
2022-06-15 08:13:10, Info                  CBS    Winlogon: Simplifying Winlogon CreateSession notifications  
2022-06-15 08:13:10, Info                  CBS    Winlogon: Deregistering for CreateSession notifications  
2022-06-15 08:13:10, Info                  CBS    FinalCommitPackagesState: Started persisting state of packages  
2022-06-15 08:13:10, Info                  CBS    FinalCommitPackagesState: Completed persisting state of packages  
2022-06-15 08:13:10, Info                  CBS    Enabling LKG boot option  
2022-06-15 08:13:10, Info                  CBS    Exec: Will not run corruption repair because no store corruption found.  
2022-06-15 08:13:10, Info                  CBS    Exec: Processing complete.  Session: 30965903_3172651301, Package: Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.17763.1, Identifier: Windows Foundation [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]  
2022-06-15 08:13:11, Error                 CBS    Failed to perform operation.  [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]  
2022-06-15 08:13:11, Info                  CBS    Session: 30965903_3172651301 finalized. Reboot required: no [HRESULT = 0x80073701 - ERROR_SXS_ASSEMBLY_MISSING]  
2022-06-15 08:13:11, Info                  CBS    Failed to FinalizeEx using worker session [HRESULT = 0x80073701]  
2022-06-15 08:15:12, Info                  CBS    Trusted Installer is shutting down because: SHUTDOWN_REASON_AUTOSTOP  

It states that there is an issue with the Package 3821 for KB5001638. I tried to install the KB5001638 manually but this failed using the installer. I also tried to install the update using the DISM tool but this did not solve the issue as well. Additionally I tried to reinstall the KB5000859 but this also failed, since I cannot uninstall the update because it is an security update.

Then I checked the Package_3821_for_KB5001638~31bf3856ad364e35~amd64~~10.0.1.3 Package, it is in the correct directory and when I compare the File Hash with the one of another computer they are identical.

Does anyone know how to solve this issues without reinstalling the operating system?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,562 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,603 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,781 Reputation points
    2022-06-16T07:21:24.487+00:00

    Hi there,

    This error might occur if the versions of the .NET Framework installed have been corrupted on the system.

    The .NET Framework Repair Tool provides an option to repair the versions of the .NET Framework that are installed on the computer. As you have tried the SFC & DISM scans I would suggest you to download the tool from the below link and then run it and see if the script works properly after this.

    Microsoft .NET Framework Repair Tool is available https://support.microsoft.com/en-us/topic/microsoft-net-framework-repair-tool-is-available-942a01e3-5b8b-7abb-c166-c34a2f4b612a

    ----------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.