I have a problem with this feature. In PowerShell, overall it works fine, but sometimes it gives me the following error:
Add-WindowsFeature : The request to add or remove features on the specified server failed.
Installationof one or more roles, role services, or features failed.
The operation cannot be completed because Windows is currently performing another servicing operation.
Wait a few minutes and try running the command again. Error: 0x800f0902
At line:1 char:1
+ Add-WindowsFeature NET-Framework-Features,NET-Framework-Core,NET-Framework-45-Fe...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (@{Vhd=;Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
Exception
+ FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand
It seems that either the SCEP Update/Scan or the Automatic Maintenance (in the Action center) causes the Add-WindowsFeature to fail. Is there a way to check if these are active and/or wait until these are done, before I install my Windows feature? This way
at least the installation should always succeed.
Like I said, most of the time, it works fine; (for reference:) I use the following commands:
Import-Module ServerManager
Add-WindowsFeature NET-Framework-Features,NET-Framework-Core,NET-Framework-45-Features,NET-Framework-45-Core,NET-Framework-45-ASPNET -Source "path to sources share"
Also added this question to my own blog:
http://powershelladministrator.wordpress.com/2014/04/02/add-windowsfeature-error-0x800f0902-the-operation-cannot-be-completed-because-windows-is-currently-performing-another-servicing-operation/