DISM.exe isn't recognizing .Net 3.5.1 installer

2

I've got a script trying to install some features on Server 2016. If it detects that .Net 3.5.1 isn't installed, it builds the following DISM.exe command:

Start-Process -FilePath DISM.exe -ArgumentList "/Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:`"$env:SPbits\PrerequisiteInstallerFiles\sxs`"" -NoNewWindow -Wait

I've got the sxs directory and have placed the 3.5.1 installer in it, which is named dotnetfx35.exe, the default name given to it by MS, but the process throws an error saying it can't find the source file. So is the filename mismatched with what DISM is expecting, or do I simply have the wrong installer? I haven't been able to find any documentation about what DISM is looking for, so that's making it difficult to troubleshoot.

The error it's throwing is 0x800f081f The source files could not be found. Suggested workarounds are to just install it manually, but I need this to be automated for quick rollouts.

Quick edit: The script verifies the existence of the directory before attempting to execute DISM, so I know that isn't the problem.

.net
powershell
windows-server-2016
asked on Stack Overflow Jan 5, 2018 by thanby

2 Answers

1

Try, installing 3.5 first, which is in WS2016

Using Server Manager or Add-WindowsFeature and then try and update.

Yes, you can use on 3.5 on WS2016, it is an installable feature, 3.5.1 is not.

(Get-CimInstance -ClassName CIM_OperatingSystem).Caption
Microsoft Windows Server 2016 Datacenter

Get-WindowsFeature -Name '*Net*Framework*' | Select Name,InstallState

Name                      InstallState
NET-Framework-Features       Installed
NET-Framework-Core           Installed
NET-Framework-45-Features    Installed
NET-Framework-45-Core        Installed
NET-Framework-45-ASPNET      Installed
answered on Stack Overflow Jan 6, 2018 by postanote
-1

Try to unpack the dotnetfx35.exe into some folder and then use the folder path as DISM Source parameter.

Unpack via winrar or try dotnetfx35.exe /?

answered on Stack Overflow Jan 5, 2018 by Lumir J.

User contributions licensed under CC BY-SA 3.0