How to Fix Add-WindowsCapability failed Error code = 0x800f0954

Share This:

0x800f0954

If you have tried to install a Windows Compatibility feature in Windows 10, Windows 11, Windows Server 2019, or Windows Server 2022, you might have come across: Add-WindowsCapability failed. Error code = 0x800f0954. You can view the WindowsCapability error logs in the C:\Windows\Logs\DISM\dism.log file and you might see something similar to this:

DISM DISM Package Manager: PID=1280 TID=6320 Error in operation: (null) (CBS HRESULT=0x800f0954) – CCbsConUIHandler::Error
DISM DISM Package Manager: PID=1280 TID=5772 Failed finalizing changes. – CDISMPackageManager::Internal_Finalize(hr:0x800f0954)
DISM DISM Package Manager: PID=1280 TID=5772 Failed processing package changes with session options – CDISMPackageManager::ProcessChangesWithOptions(hr:0x800f0954)
DISM API: PID=11232 TID=1244 Failed to install capability. – CAddCapabilityCommandObject::InternalExecute(hr:0x800f0954)
DISM API: PID=11232 TID=1244 InternalExecute failed – CBaseCommandObject::Execute(hr:0x800f0954)
DISM API: PID=11232 TID=8352 CAddCapabilityCommandObject internal execution failed – DismAddCapabilityInternal(hr:0x800f0954)

How to Fix Add-WindowsCapability failed Error code = 0x800f0954

You’ll need administrator rights to fix this issue, so once you’re logged in as an administrator, go through these steps:

  • Start > Run gpedit.msc
  • Go to Computer Configuration > Administrative Templates > System
  • Open Specify settings for optional component installation and component repair
  • Select Enabled and check the box for Download repair content and optional features directly from Windows Updates instead of Windows Server Updates Services (WSUS)
    gpedit component installation
  • In Powershell, run gpupdate /force
  • Now Rerun the Add-WindowsCapability command to install the feature and it should work

Depending on your environment, you might want to consider undoing these settings once you install your feature because this could install unnecessary updates on your machine, especially if you’re using SCCM.


Share This:

 

Leave a Reply