Features on Demand – a new way of conserving system partition space in Windows 8 and Server 2012. It is possible not only to uninstall a feature, but to delete files associated with that feature – they are called payload. You can install a feature again when you need to, but you’ll have to provide a valid installation source. This feature can be used when working with installed operation system – for saving useful system partition space – or with installation media for reducing the size of the image.

This way of installing features reminds me Linux – some sort of repository, commands like yum install – Install-WindowsFeature. Now we have an opportunity to make installation media as small as possible (like Linux minimal install) – and the same is true for the system partition. And in the corporate environment this feature plays it’s role even better! In this short tip, we will talk about two implementations of Features on Demand – removing feature with payload from installed and working system and from installation media.

To use Features on Demand, you need to uninstall chosen feature with the associated payload. There are several ways to do this: DISM.exe, DISM powershell cmdlet and Server Manager powershell cmdlet.

Configuring features on demand: uninstall with the payload

Here are the examples of using all three tools mentioned earlier. Notice how the state changes – from Enabled to Disabled with payload removed.

DISM.exe example:

DISM PowerShell cmdlet example:

Server Manager cmdlet example:

Features on demand can be used not only with already installed systems, but also with system images or installation media in .WIM format. The process is similar to working system, except commands for mounting, committing changes and unmounting an image. I covered this process in more detail in my article dedicated to working with system images, but I show you a brief example of such command using DISM.exe:

After that, the state of a feature will change to Disabled with payload removed

Configuring features on demand: install a feature with payload removed

But what if we need to install a feature previously removed with its payload? Then you have to specify where to get payload for requested feature, and there are three options:

  • Specify files location using Add Roles and Features Wizard or DISM installation commands
  • Specify files location by GP setting
  • Use Windows Update

If you are installing a feature previously removed with its payload with Server Manager, you’ll see this warning:

Features on demand 1     But if your server has an Internet access, you can just proceed with the install, letting your system download files needed for installation from Windows Update. But remember – you can’t use WSUS as a valid installation source

Another option for feature installation – is to specify a files location. For manual installation, you can use an installation image containing needed feature files. To install a feature on demand using an installation image as a source, you can use DISM.exe like in this example:

 

But in the corporate environment we need something more automated. First, we must create file repository – a simple network share – in two steps:

  • Create a shared folder. Security settings: Read permissions on Everyone group OR to computer accounts in the domain environment
  • Copy the Sources\SxS folder to the share from an installation media

Then we can create a Group Policy to define this installation source for client computers. This setting is located in the Administrative Templates\System node and is called “Specify settings for optional component installation and component repair”.

Features on Demand 3Also we can deny usage of Windows Update by group policy.

 

 

 

We have mastered a new option – features on demand, learned three ways of completing our goal of removing a feature with the payload, and discovered how to get things back when we need to.

Reference:

DISM.EXE