question

Saf-2075 avatar image
3 Votes"
Saf-2075 asked Saf-2075 commented

Windows 2022: Install-WindowsFeature fails but Server Manager GUI install works

I am currently attempting to migrate services from a Windows 2016 server to Windows 2022 however, I am running into an issue when installing Windows features. For this example I will reference the feature 'RSAT-SMTP' but the same issue happens with other features.

I attempted using the command below and you can see the result:

     PS C:\Windows\system32> Install-WindowsFeature RSAT-SMTP
 Install-WindowsFeature : The request to add or remove features on the specified server failed.
 Installation of one or more roles, role services, or features failed. Error: 0x800f0922
 At line:1 char:1
 + Install-WindowsFeature RSAT-SMTP
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exception
     + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand
    
 Success Restart Needed Exit Code      Feature Result
 ------- -------------- ---------      --------------
 False   No             Failed         {}
    
    
 PS C:\Windows\system32>

When attempting to install the feature via the Server Manager GUI, it works fine:

191284-rsat-smtp.png

Researching the error code in the powershell output shows two possible options:

1) The server can't reach the WSUS site. - This is correct, the server can NOT reach the WSUS site as it does not have direct outbound access. However, it also doesn't have access when installing via server manager.
2) There is less than 500 MB free. - This is incorrect, there is over 10 GB free space.

So my question is, what is different between installing via powershell and server manager on Windows 2022? The powershell command works fine when installing on Windows server 2016



windows-serverwindows-server-powershell
rsat-smtp.png (133.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

As a test, I gave the server full outbound access and confirmed I could hit external sources but still the installation via Powershell failed.

One thing I forgot to note in my initial post. If after I install via the GUI, remove the feature, then install the feature via Powershell. It works fine.

0 Votes 0 ·

0 Answers