The Windows Servicing Guy

Tips and tricks from a Windows support engineer on issues related to servicing

Features on Demand (Part 2)

Features on Demand (Part 2)

  • Comments 5
  • Likes

In part 1, I talked about how to remove a Role/Feature using Features on Demand. In this blog, I will be talking about how to add a feature back after it has been removed.

Adding previously removed Features back to a computer using Features on Demand

As I mentioned in part 1 there are three available sources for adding roles and features back to a computer after their payloads have been removed using the Features on Demand option.

· Installation Media

· Network location of install.wim from media

· Windows Update (if configured)

To add features back into an image, administrators will need to use DISM.exe from an elevated command prompt, the Windows PowerShell cmdlets for DISM or Server Manager and path to the Windows Image file (.WIM) that holds the necessary payload for the feature to be restored. Source paths are not required if GPO’s have been defined for the environment. I’ll talk about that later.

To restore features using DISM.exe

1. Locate the .WIM file that contains the payload for the restore operation. This can be located on locally attached storage or a network share.

2. Run the command: DISM /online /enable-feature /featurename:WindowsServerBackup /source:wim:c:\install.wim:2 /limitaccess (where the WIM index is the image in the WIM file that contains the source of the feature payload)

a. The limitaccess switch will prevent the installation from attempting to contact Windows Update/WSUS Servers.

You can get the WIM index using the following command:


If you didn’t specify the source path you would get the following:


When restoring Roles/Features using the Server Manger GUI interface you will get the following notifications if the GPO is not configured.



Group Policy for Features on Demand

As I mentioned earlier there is a new Group Policy option in Windows Server 2012 allows for the configuration of an installation source for domain joined clients. The Group Policy is located in the Group Policy Editor in the Administrative Templates\System node and named "Specify settings for optional component installation and component repair".


Available policy settings include the following:

· Alternate source file path: Specifies the network location for use in installation operations. This must be a fully qualified path and can be either a folder location or WIM file. You can specify multiple paths by using ";" between the paths. Valid syntax is wim:<path to wim>:<index>

· Never attempt to download payload from Windows Update: Disables the use of Windows Update as an installation source

clip_image008 Note:

Windows Server Update Services (WSUS) is not configurable as a recovery source for Features on Demand


Values for this policy are in the registry under the following key:





Possible registry values include:

• LocalSourcePath – Specifies location to use for installation source. Can specify more than one source when separated with a “;”. Valid sources include a network folder path or a WIM file (using the syntax wim:<path to wim>:<index>)

• UseWindowsUpdate – Enables use of Windows Update as an installation source

clip_image008[1] Note:

If the Never attempt to download payload from Windows Update checkbox is not checked, or if you do not use the /limitaccess switch using dism or powershell, features on demand will always attempt to use Windows Update first for the payload files.

  • I wish there was some intelligent behavior built into it to automatically detect a removable drive and its drive letter (if one is connected) containing Windows Setup files and look automatically in that path. Will be great for scripts.

  • That's an interesting idea.  Right now you could technically do it so long as you knew the drive letter for the device, of course, that's the crux of the issue with removable, the letter may always be different.  Thanks for the suggestion xp.

  • What happens once a service pack is installed?  Do you need to point to install media with the service pack integrated?  (Will there be a way to integrate the service pack into install media?)

  • If a Service Pack were released, you'd need to update the source media to reflect that.  I have instructions here:

    I dont have any information to share on a service pack for Win8/2012 nor if it would be intergate capable.

  • I pray daily that MS will backport the Component Based Servicing improvements made in Windows 8 to Windows 7 SP2. :) At least, the part that cleans up superseded updates using dism / cleanmgr. Will be totally awesome.