Deploy Feature on Demand using SCCM

Benoit LecoursSCCM15 Comments

Beginning with Windows 10 1709, you can’t use WSUS to host Features on Demand and language packs for Windows 10 clients. Instead, you need to download them directly from Windows Update. This is the official Microsoft Statement… at the time of this writing, it’s still possible to download FoD on VLSC or MSDN. We are in a transition method but clearly sees where Microsoft is going. This blog post will show one method to install FoD using SCCM but there are alternative methods also when you download the file from VLSC or MSDN (hint : Use Dism).

Features on Demand (FODs) are Windows feature packages that can be added at any time. When a Windows 10 PC needs a new feature, it can request the feature package from Windows Update.

If you’re using SCCM or WSUS for your software update, you need to change a Group Policy setting that lets clients download these directly from Windows Update instead of your on-premise infrastructure. Without this group policy, all your installation tentative will fails with error 0x800f0954. This is because your client will check on your on-premise servers instead of Microsoft Update and won’t be able to find the feature.

Deploy SCCM Feature on Demand

You can also host Features on Demand and language packs on a network share, but starting with Windows 10 1809, language packs can only be installed from Windows Update. This is why we recommend using the group policy method to redirect your clients to Windows Update to get FoD or Language packs.

To change this policy :

  • Open your group policy editor
  • Navigate to Configuration\Administrative Templates\System
  • Enable the Specify settings for optional component installation and component repair policy

Deploy SCCM Feature on Demand

  • Check the Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS) checkbox

Deploy SCCM Feature on Demand

Changing this policy only enables Features on Demand and language pack downloads from Windows Update. It doesn’t affect how clients get feature and quality updates deployed by SCCM.

Deploy a Feature on Demand using SCCM

To deploy a new feature on demand to your client, you must understand a couple of things.

First, you need to understand that SCCM/WSUS can’t host these features so it will be downloaded from the internet by your SCCM clients.

The trick is to use the Add-WindowsCapability PowerShell cmdlet to call the feature that you need. You can get a list of available Feature on demand on Microsoft Doc or by using this PowerShell command :

Get-WindowsCapability -online 

Deploy SCCM Feature on Demand

Each Feature on Demand has a state. It can be Installed or Not present. Depending on the Windows 10 version, you may have a different list of “not present“. Follow Microsoft Documentation to see which Feature can apply to your Windows version or see the list yourself running the Get-WindowsCapability -online command.

For our example, we are running Windows 10 1809 and we’ll use SCCM to deploy XPS viewer but it can be used for any Feature on demand. You just need to change your script to call the right Capability name. (In our example the Capability Name is XPS.Viewer~~~~0.0.1.0). We can also see that the size of this Feature is nearly 17MB

Hint: You can also install a series of Feature in a single command. For example, Remote Administration Tools have all Capability name like “RSAT*”. So to install all Remote Administration Tools on a Windows 10 1809 machine, simply use this command :

Get-WindowsCapability -Online -Name RSAT* | Add-WindowsCapability -Online

Deploy Features on Demand to client remotely using SCCM

To deploy FoD using SCCM you have 2 options. The first one is to use the new script feature if you are running SCCM 1706 or later. The second one would be to deploy using a standard package or application.

Script Feature

We’ll start by deploying it using the SCCM Script feature

  • In the SCCM Console, go to Software Library\Scripts
  • Create a new PowerShell script with this command (Change the FoD name if needed)
Get-WindowsCapability -Online | where name -like xps* | Add-WindowsCapability -Online

Deploy SCCM Feature on Demand

  • Complete the Script wizard
  • Approve your script by selecting it and click Approve on the top ribbon
  • Go to a test collection and right-click it, select Run Script

Deploy SCCM Feature on Demand

  • Select the script you just created

Deploy SCCM Feature on Demand

  • Validate Script Execution in the next screen. You can also monitor the script status in the console Monitoring\Script Status

Deploy SCCM Feature on Demand

Results

You can now validate that the Feature on Demand is installed on your test computer.

  • Using PowerShell : Get-WindowsCapability -Online | where name -like xps
  • State should be Installed

Deploy SCCM Feature on Demand

  • In the Windows 10 Start Menu
  • XPS Viewer is installed

Deploy SCCM Feature on Demand

Further FoD installation logging can be found locally on the computer C:\Windows\logs\dism\dism.log

Package

If you prefer to use the good old Package method, you need to :

  • Create a PowerShell file FOD-Install.ps1 with this command :
Get-WindowsCapability -Online | where name -like xps* | Add-WindowsCapability -Online
  • Create a new Package with source file pointing on your powershell file
  • For the program, specify the following command line :
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File .\FOD-Install.ps1
  • Distribute the Package to your Distribution Point
  • Deploy your package to your test collection (Available or Required)
  • Initiate a client refresh policy
  • The results will be the same as for script (see Result Section above)

We expect Microsoft to increase the release of Feature on Demand in the following Windows release. We can clearly see where this is going. In a future post we’ll talk about language pack installation which should be pretty similar. Stay tuned !

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
Loading...

Share this Post

15 Comments on “Deploy Feature on Demand using SCCM”

  1. HI

    I have some clients who need good sites so we have found your site which is good but our budget
    is not high so please give us price for https://www.systemcenterdudes.com
    we need dofollow link
    we will pay you through paypal
    need time for paying 3 to 4 days because only need verification from client

    you can trust on us because we will not cheat you as we receive payment from client we will forward you..
    Wait

  2. Is the RepairContentServerSource value suppose to be 2 after setting this policy? Mine is 2 but will still not go to Windows Update for FoD.

  3. Prepare to add significant time to any future Windows 10 Feature upgrades. Since FoD can only be installed from Microsoft Update and cannot be hosted locally, when you (SCCM) deploy Windows 10 1903 upgrades to computers that have FoD installed, each computer will download those FoD updates from Microsoft which can add significant time to the installation, depending on your Internet connectivity/speed. For example, my laptop has the RSAT installed and it took about 20 minutes to download all of those FoD updates, plus some OS build update (KB4497935). The default max runtime for Windows 10 Feature Updates in SCCM is 60 minutes, so you may need to increase that value significantly to avoid timeouts. Maybe an HTTP proxy would be of help?

  4. hellow all
    i tried to use the powershell script van microsoft
    it works when i specify a local source folder

    problem is that we would like to use a unc path
    someone already used this option?

    thank you

    https://blogs.technet.microsoft.com/askpfeplat/2018/12/18/rsat-on-windows-10-1809-in-disconnected-environments/

    #Specify ISO Source location
    $FoD_Source = “C:\Temp\RSAT_1809_en-US”
    #Grab the available RSAT Features
    $RSAT_FoD = Get-WindowsCapability –Online | Where-Object Name -like ‘RSAT*’
    #Install RSAT Tools
    Foreach ($RSAT_FoD_Item in $RSAT_FoD)
    {
    Add-WindowsCapability -Online -Name $RSAT_FoD_Item.name -Source $FoD_Source -LimitAccess
    }

  5. Good preparation of the topic. I should have looked right at your side.
    We already have the 0x800f0954 error in our SCCM/WSUS environment while using “Get-WindowsCapability…” commandlines.
    After changing the GPO “Download repair content and optional…” we no receive a different error: 0x8024002e

    After changing regkey Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\UseWUServer from “1” to “0” and restarting “wuauserv” service I was ablte to install
    XPS like mentioned in your example wit the commandline: ” PS C:\Users\P00407701\Downloads> Get-WindowsCapability -Online | where name -like xps* | Add-WindowsCapability -Online”

    But now there is a big problem. Locking on Settings -> Windows Update -> Search for Updates showed my client to download updates from MS directley and not from my SCCM/WSUS environment.

    Is there any setting i missed here?

    1. Did some more testing.
      Changing Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\DisableWindowsUpdateAccess from “1” to “0” prevents error 0x8024002e and
      commandline: ”Get-WindowsCapability -Online | where name -like xps* | Add-WindowsCapability -Online” works now.

      But now, our users are able to use “Windows Update – Check online for updates from Microsoft Windows” again.

      I have something to consider that our users are now able to import Windows Feature Updates over here.

  6. Im curious how it works to deploy certain language packs within a task sequence. As i have issues imaging a 1809 machine with a certain language pack as default.

  7. But there are features in sccm under windows 10 servicing , can’t we go for directly deploy to clients?like normal software updates.

  8. Quick question. Because we’re using SCCM/WSUS, this UseWUServer is obviously set to 1 meaning the computer cannot go to Windows update. Does this setting you suggest override that or does this setting have to first be modified?

    1. From my experince this will not change the UseWUServer key but as long as “UseWUServer” is set to “1” we receive the error 0x8024002e. If we change this to “0” our clients are able to download Updates from MS directly. So I’m still searching if we missed some settings here so we only use updates provided from our SCCM servers.

  9. Great article this is exactly what I needed for our organization. Question though is there a post yet regarding doing this for the Language Packs?
    Thanks

  10. I noticed that the my SCCM clients flip the UseWUServer reg key from 0 to 1 when the Software Update Scan Cycle runs. Anybody else seeing the same behavior?

    1. Zeb – that registry key has nothing to do with this article or solution.

      The “Specify settings for optional component installation and component repair” GPO sets the following registry key:
      HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing\RepairContentServerSource

Leave a Reply

Your email address will not be published. Required fields are marked *