1

How can windows optional features be installed on a server that does not have internet access?

Enable-WindowsOptionalFeature -Online -FeatureName "IIS-IPSecurity" -All

This works fine with most of the features, as I assume they are packaged (but not activated) with windows server 2016 (standard). Two features in particular fail to install as the server has no internet connection:

Enable-WindowsOptionalFeature : 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.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName "IIS-NetFxExtensib ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

The error mentions using the -Source option to potentially specify a local source, but in the linked documentation I cannot find any reference as to how to actually acquire these source files individually to install from.

Are these files available? or do I have to build a image to use with DISM?

4
  • @Ramhound specifying C:\Windows\WinSxS\amd64_microsoft-windows-iis-netfxextensibility_..... fails to find the source - I assume this is where it's looking for the source anyway? the only file in there is validcfg.dll
    – Mjr
    Commented Feb 11, 2020 at 4:00
  • Related - serverfault.com/questions/614874/…
    – Madhubala
    Commented Feb 11, 2020 at 6:19
  • thankyou for the help, it appears that I needed to specify the version of the .net framework for the two packages I was having issues with (NetFxExtensibility & ASPNET), in this case IIS-NetFxExtensibility45 was what I was after
    – Mjr
    Commented Feb 11, 2020 at 6:28
  • @Mjr - Wonderful I spent an hour writing an answer
    – Ramhound
    Commented Feb 11, 2020 at 13:07

2 Answers 2

1

The error mentions using the -Source option to potentially specify a source but in the linked documentation I cannot find any reference as to how to actually acquire these source files individually to install from.

You need to mount your Windows Server 2016 ISO. You need to use the correct index. You should mount the ISO to a virtual drive the use that install.wim when you mount the image.

Dism /Mount-Image /ImageFile:C:\test\images\myimage.wim /index:1 /MountDir:C:\test\offline

The following command will then use that mounted image to install the feature.

Enable-WindowsOptionalFeature -Online -FeatureName IIS-IPSecurity -All -Source "c:\test\offline”

Sources

2
  • This answer assumes the feature you want to install exists. Be sure you use Get-WindowsOptionalFeature to get the proper feature name
    – Ramhound
    Commented Feb 11, 2020 at 5:07
  • Thanks for your help @Ramhound it turns out I just had the wrong name for the feature as i didn't specify the .net framework that it was based on/used
    – Mjr
    Commented Feb 11, 2020 at 6:33
1

In this particular case, it appears the two packages that were failing actually just needed the .NET framework version specified which is part of the feature name.

Enable-WindowsOptionalFeature -Online -FeatureName "IIS-NetFxExtensibility45" -All
Enable-WindowsOptionalFeature -Online -FeatureName "IIS-ASPNET45" -All

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .