6

I am getting an error when I run this command in PowerShell:

Install-WindowsFeature -Name Web-Net-Ext -source D:\Sources\SxS

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. The source files could not be found.

Every article and blog I've read says that that path needs to be specified. How can a reference to this folder be obtained?

CJBS
  • 15,147
  • 6
  • 86
  • 135
Cataster
  • 3,081
  • 5
  • 32
  • 79

3 Answers3

8

Figured it out

  1. Download the .ISO for Windows Server 2016 (could be the 180 day evaluation version). https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016

iso

  1. Mount the .ISO as a drive. mount

this is mounted by default to D:

  1. Copy the /sources/sxs folder to wherever it needs to go. by default, the SxS file will be at D:\Sources\SxS

  2. run the command :D

    Install-WindowsFeature -Name Web-Net-Ext -source D:\Sources\SxS

Cataster
  • 3,081
  • 5
  • 32
  • 79
  • 1
    For MSDN/Visual Studio subscribers, the source can also be downloaded here in the same fashion: https://my.visualstudio.com/Downloads?q=Windows%20Server%202016%20Standard&pgroup= – CJBS Nov 25 '19 at 20:17
  • @CJBS im guessing that only works if the person is a subscriber right? cause i got this error: We didn't find results for "Windows Server 2016 Standard" – Cataster Nov 26 '19 at 00:26
  • 1
    yes, hence "For MSDN/Visual Studio subscribers". Your approach should always work -- while the product is current. MS probably removes the ability to download evaluation media for a product when its successor is released, whereas legacy ISO downloads remain available for subscribers on MSDN. – CJBS Nov 27 '19 at 00:01
  • 1
    I had trouble mounting the ISO from a network path on a Windows Server 2019 environment. The solution was to copy the ISO to a local temp folder and mount it from there. – LSA Sep 27 '21 at 11:28
1

The source parameter defines the folder where your windows installation media / feature files are stored. The parameter itself is optional and the command should work without specifying the source.

Here's the documentation for the cmdlet.

Peter Schneider
  • 2,879
  • 1
  • 14
  • 17
  • but i get this is fi dont use source: 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. 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. Error: 0x800f081f – Cataster Apr 02 '19 at 18:45
  • I guess your problem is that adding this feature requires internet access. See [here](http://corporateitsystems.blogspot.com/2014/03/error-adding-web-asp-net-web-net-ext.html) – Peter Schneider Apr 02 '19 at 18:55
  • 1
    that link says this: In the bottom enter the SXS folder path in Specify an alternative source path....but thats my problem: i dont know where this SxS thing is on my server nor where to get it from – Cataster Apr 02 '19 at 19:01
0

@cataster the sxs folder is in windows server installation files

  • 2
    This question has already been answered, and with _far_ more detail. Please review the accepted answer for a good example of how to contribute to Stack Overflow. – Jeremy Caney Feb 04 '22 at 00:41