Partager via


Adding features (including .NET 3.5) to Windows 10

Windows 10 has created a new way of installing features that aren’t included in the operating system image, kind of like the situation with .NET Framework 3.5 in Windows 8 and Windows 8.1.  Similar, but different.  This enables us to keep the operating system smaller for those that don’t need these features.

To read more about this new “Features on Demand v2”, see the documentation on MSDN (which is where all the ADK documentation can be found now, by the way) at https://msdn.microsoft.com/en-us/library/windows/hardware/mt171094(v=vs.85).aspx.

So if the pieces for these features aren’t included in Windows, where can they be found?  At the moment, in two places:

  • On Windows Update.  As a result, machines connected to the internet can download the pieces that are needed automatically.
  • On MSDN Subscriber Downloads (for those with MSDN subscriptions) and the Volume Licensing Service Center (for those with VL agreements).  There is a “Windows 10 Features on Demand” ISO available for download that can be used for machines that can’t reach the internet.  (There are separate x86 and x64 ISOs.)

(At the moment, these aren’t available in WSUS, but that’s something we’re working on.)  Let’s look at these one at a time.

From the Internet

So how do you add these features?  There are two approaches, manual and automated.  For the manual approach, use the Settings app and navigate to “System –> App & features –> Manage optional features” and click the “+” sign to add a new one.

image

If you noticed that the list took a while to populate, with the spinning progress wheel, that’s because it’s building this list from Windows Update – that can take some time.

For the automated approach, you can use DISM.EXE or PowerShell, take your pick.  To list the available “capabilities” (a rather arbitrary name to separate them from features), just use one of these:

DISM.EXE /Online /Get-Capabilities

Get-WindowsCapability -Online

Both will show the same results, but here’s an example from the PowerShell command (the second one, if you didn’t guess):

image

Notice in that list of couple of items of interest:  NetFx3 (.NET Framework 3.5) and the Insider Hub.

Adding them from the GUI is obvious enough.  From the command line isn’t too bad either:

DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3~~~~

Add-WindowsCapability –Online -Name NetFx3~~~~

Yes, the tilde characters are required, they are part of the name.

From the Media

So back to the other mechanism, the Windows 10 Features on Demand ISO that you can download.  How do you use that?  The basic steps:

  1. Download it.
  2. Extract the contents into a folder, either on the local system or at a network path that the computer can access (open up permissions for domain-joined computers and users).
  3. Tell Windows to use that location.

All you should need to do is tell DISM.EXE or the PowerShell Add-WindowsCapability the path with the Source switch:

DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3~~~~ /Source:C:\Features

Add-WindowsCapability –Online -Name NetFx3~~~~ –Source C:\Features

And as you could do with Windows 8/8.1, you can also specify a “LimitAccess” switch to say “never use anything but the specified source”, if you want to keep it from trying the internet as a fallback.  Unfortunately this isn’t working at the moment, if the machine doesn’t actually have internet access (which kind of defeats the purpose of doing this) – still investigating that.

So that leaves one more question:  What if you wanted to enable the GUI to add these features?  How do you tell it where the extracted features are?  Well, you can’t. The GUI will only talk to the Internet, so you have to use DISM.

From the Media:  A Convenient Workaround

Remember that I said the media isn’t working when you don’t have internet access?  Well, there is a workaround.  The files on the media are CAB files, and those CAB files are actually Windows packages that can be added using:

DISM.EXE /Online /Add-Package /PackagePath:C:\Features\Microsoft-Windows-NetFx3-OnDemand-Package.cab

Comments

  • Anonymous
    September 02, 2015
    If you didn’t read through my last post at http://blogs.technet.com/b/mniehaus/archive/2015/09/01/adding
  • Anonymous
    September 03, 2015
    Pingback from Windows 10 Articles | IT-Operations-Management
  • Anonymous
    September 03, 2015
    What are the advantages of this new version of Features On Demand, or "Capabilities"?
    I see one mention of not needing to know the build number in the article below, but I've never needed a build number to install .Net 3.5 on win 8.1 or 2012R2...

    https://msdn.microsoft.com/en-us/library/windows/hardware/mt171094(v=vs.85).aspx
  • Anonymous
    September 03, 2015
    The comment has been removed
  • Anonymous
    September 03, 2015
    The comment has been removed
  • Anonymous
    December 22, 2015
    C:Windowssystem32>DISM.EXE /Online /Get-Capabilities

    Deployment Image Servicing and Management tool
    Version: 10.0.10240.16384

    Image Version: 10.0.10240.16384


    Error: 0x800f0906

    The source files could not be downloaded.
    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, seehttp://go.microsoft.com/fwlink/?LinkId=243077.

    The DISM log file can be found at C:WindowsLogsDISMdism.log
  • Anonymous
    February 26, 2016
    Can anyone explain the rationale about the naming convention? On Windows 2012: nstall-WindowsFeature Net-Framework-Core. On Windows 10: Add-WindowsCapability -Online -Name NetFx3~~~~. It's bizarre and counterintuitive.
  • Anonymous
    May 22, 2016
    Thanks. This post helped me resolve the .netfx3 issue on windows 10.
  • Anonymous
    June 10, 2016
    What are the differences between this and using the built-in task sequence add features step?https://i-technet.sec.s-msft.com/en-us/itpro/windows/deploy/images/fig8-cust-tasks.png