In the recently released Windows 10 Build 1809, Microsoft have decided to change the method on how to enable .NET Framework 3.5 from command line. The command line installation method is extremely usefull, when it comes to for example when installing new computers with SCCM Task Sequence.
In older Windows 10 Builds, the method was quite straight forward and it still is, if you know where to look.
In older builds, the install script looked like this:
1 2 |
$currentLocation = Split-Path -Parent $MyInvocation.MyCommand.Path; Enable-WindowsOptionalFeature -Online -FeatureName NetFx3 -Source $currentLocation -LimitAccess -All |
And the file name needed was microsoft-windows-netfx3-ondemand-package.cab, that was located in the installation media sources\sxs -folder.
In the newest 1809 Build this has changed. The new script needed looks like this:
1 |
%SYSTEMROOT%\System32\Dism.exe /Online /LogLevel:4 /Add-Package /PackagePath:"%~dp0microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab" /NoRestart /Quiet |
The new file microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab can still be found from the same sources\sxs -folder.