How to add Features like .Net Framework in wim file with dism tool

How to add Features like .Net Framework in a wim file with dism tool. In some evironments window 10 clients are blocked to access windows updates. Last time a customer decide to insall just .net 4.5 in the golden image used by sccm to deploy OS. During the test we discover that some apps required the legacy .net 3.5 and 2.5. The esieat way was;

  • Copy .wim file used in sccm for OSD in a difrent location, in my case on my own workstation
  • Mount in my computer original .iso file who has the folder \sources\sxs where binary for .net are stored, in my computer is F:
  • Ussefull comands:
    • to see detals about the image¬†
    • Dism /Get-ImageInfo /ImageFile:C:\temp\windows10-1803.wimTo see details about the image
    • Mount the image:
    • Dism /Mount-Image /ImageFile:C:\temp\windows10-1803.wim /Name:"1" /MountDir:C:\temp\offline
    • Add the required feature in the image, specify the path to binary:
    • Dism /Image:C:\temp\offline /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:F:\sources\sxs
    • Check if the future is installed:
    • Dism /Image:C:\temp\offline /Get-FeatureInfo /FeatureName:NetFx3
    • Save image and pply the changes:
    • Dism /Unmount-Image /MountDir:C:\temp\offline /Commit
  • Copy the new .wim file in SCCM sorce file and this new one in SCCM mages, distribute the new image