Enabling Feature ServerMediaFoundation on windows 2019 Server

Hi,

I have issues with installing/enabling ‘ServerMediaFoundation’ in a container with base image *NO_LINK*mcr.microsoft.com/dotnet/framework/runtime:4.8’ on a windows 2019 server.
On a wndows 2016 the script worked before, but now it does not succeed on a 2019.

RUN $mfp = Get-ChildItem -Path (Join-Path ‘C:\Windows’ ‘\servicing\Packages’) -Filter 'Microsoft-Windows-Media-Format-Package.mum’; `*

  • ForEach ($file in $mfp) { `*
  •   (Get-Content $file.FullName).replace(' restart=\"required\"', '') | Set-Content $file.FullName; `*
    
  • } `*
  • Install-WindowsFeature Server-Media-Foundation -Source "C:\Package\sxs*

The content of sxs I copied from the 2019 iso image.
The error I get is:
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.
The source files could not be found.
Use the “Source” option to specify the location of the files that are required
to restore the feature. For more information on specifying a source location,
see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f
At line:1 char:400
+ … FullName; } Install-WindowsFeature Server-Media-Foundation -Source C: …
**+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
** + CategoryInfo : InvalidOperation: (@{Vhd=; Credent…Name=localh**
** ost}:PSObject) [Install-WindowsFeature], Exception**
** + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsof**
** t.Windows.ServerManager.Commands.AddWindowsFeatureCommand**

I also tried it with dism:
C:\repository>Dism /online /Enable-Feature /FeatureName:ServerMediaFoundation

and the result was:

Deployment Image Servicing and Management tool
Version: 10.0.17763.771

Image Version: 10.0.17763.805

Enabling feature(s)
[==========================100.0%==========================]

Error: 0x800f081f

The source files could not be found.
Use the “Source” option to specify the location of the files that are required to restore the feature. For more information on specifying a source location

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

But I cannot get it working.

Please help.