Showing posts with label WindowsCapability. Show all posts
Showing posts with label WindowsCapability. Show all posts

Wednesday 20 September 2023

[Solved] Add-WindowsCapability failed. Error code = 0x800f0954

In this post, we'll look at how to fix the 0x800f0954 error that may appear when installing optional Windows features such as RSAT tools, Language pack features, or any other Windows features.

Errors:

1. PowerShell Add-WindowsCapability Error:

  Add-WindowsCapability : Add-WindowsCapability failed. Error code = 0x800f0954
  At line:6 char:13
  + Add-WindowsCapability -Online -Name $langFeature
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [Add-WindowsCapability], COMException
      + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsCapabilityCommand


2. DISM Package Manager Error:

DISM Package Manager: PID=2628 TID=4325 Error in operation: (null) (CBS HRESULT=0x800f0954) - CCbsConUIHandler::Error 
DISM DISM Package Manager: PID=2628 TID=4561 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f0954) 
DISM Package Manager: PID=2628 TID=4561 Failed processing package changes with session options - CDISMPackageManager::ProcessChangesWithOptions(hr:0x800f0954) 
DISM Package Manager: PID=2628 TID=4561 Failed to install capability. - CPackageManagerCLIHandler::ProcessCmdLine_AddCapability(hr:0x800f0954) 
DISM Package Manager: PID=2628 TID=4561 Failed while processing command add-capability. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f0954) 2
DISM Package Manager processed the command line but failed. HRESULT=800F0954


Solution:

To fix 0x800f0954 error, please follow one below solutions and retry the installation.

Method 1: Local Group Policy
  • Right click on start and click Run then type gpedit.msc and hit enter.
  • Navigate to Computer Configuration > Administrative Templates > System.
  • Scroll down to find "Specify settings for optional component installation and component repair" and open the settings.
  • And select Enabled and also check the checkbox "Download repair content and optional features directly from Windows Updates instead of Windows Server Updates Services (WSUS)".
  • Go back to the PowerShell or Command Prompt window and run gpupdate /force
  • Finally rerun the Add-WindowsCapability in PowerShell or DISM command again to install the feature.


Method 2: Registry

Change WSUServer registry value to 0 and then run windows capability or DISM to directly download the components from internet. Use the following PowerShell script or use Registry GUI to do the change:


Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value 0
Restart-Service "Windows Update" -ErrorAction SilentlyContinue



Hopefully you have been able to fix the Add-WindowsCapability or DISM command failed 0x800f0954 error that so many of us have been running into.


FREE Cybersecurity Certifications

Here's 15 FREE courses provided by the Qualys. The cybersecurity firm Qualys focuses on providing cloud-based security and compliance so...