Features on Demand (Part 2)

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:

clip_image001

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

clip_image002

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

clip_image004

clip_image006

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".

clip_image007

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

clip_image010

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

HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Servicing

"LocalSourcePath"

"RepairContentServerSource"

"UseWindowsUpdate"

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.