How do you install .net framework 3.5 in windows server 2016 with Powershell

scharfshutze009

[H]ard|Gawd
Joined
May 22, 2010
Messages
2,000
How do you install .net framework 3.5 in windows server 2016 with Powershell?

I'm using this guide:

https://technet.microsoft.com/en-us/library/dn482068.aspx

and I tried this command:

Install-WindowsFeature Net-Framework-Core -source C:\Users\Administrator\Downloads\

and this command:

Install-WindowsFeature Net-Framework-Core -source C:\Users\Administrator\Downloads\dotNetFx35
setup.exe

However, I get the following error and I have no idea how to use Powershell because I was never taught in college, but I did buy a book on it and haven't found time to read it:

PS C:\Users\Administrator> Install-WindowsFeature Net-Framework-Core -source C:\Users\Administrator\Downloads\dotNetFx35
setup.exe
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.
One or several parent features are disabled so current feature can not be enabled. Error: 0xc004000d
At line:1 char:1
+ Install-WindowsFeature Net-Framework-Core -source C:\Users\Administra ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:pSObject) [Install-WindowsFeature],
Exception
+ FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind
owsFeatureCommand

Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
False No Failed {}


PS C:\Users\Administrator>
 
Last edited:

gimp

[H]F Junkie
Joined
Jul 25, 2008
Messages
10,373
dism /online /enable-feature /featurename:NetFx35 /all
(I think that's the appropriate command to install the feature and all dependents/dependencies)

If you can use cmd prompt, you can try the above.
Otherwise, the part that pinpoints the issue is: "One or several parent features are disabled"

So it could be that a dependent feature is not enabled, so it therefore cannot enable .Net 3.5
 

ND40oz

[H]F Junkie
Joined
Jul 31, 2005
Messages
12,156
You'll probably need the source for it from the Windows installer, so if you used a usb drive to install windows and it's mounted as D: you'd use this:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs
 

bigdogchris

Fully [H]
Joined
Feb 19, 2008
Messages
18,301
Yeah you cannot download it. You have to use the SXS folder directory on the install media.
 

scharfshutze009

[H]ard|Gawd
Joined
May 22, 2010
Messages
2,000
You'll probably need the source for it from the Windows installer, so if you used a usb drive to install windows and it's mounted as D: you'd use this:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs

Thanks this command worked once I put the media in the drive too just like bigdogchris said in his reply.
 
Top