Features on Demand

Features on Demand is a new feature in Windows Server 2012 that allows the install files for features to be removed from the operating system. This reduces the size of the operating system. The features can be relocated to a file share or downloaded from Windows Update. This video looks at how to do this and also how much space you can potentially save.

Download the PDF handout

Features on Demand
When you install a role or feature in Windows Server you will not be prompted for the install media. This is because the install media is copied to the server when the server is first installed. These install files are also known as the pay load. In Windows Server, Features on Demand allows that pay load to be removed from the operating system. When a feature or role is installed on the server and Windows cannot find these install files it will prompt for the install files. These can be installed by DVD, network share or Windows Update.

1. Right click the start menu and select the option command prompt. From the command prompt enter in PowerShell.
2. To uninstall a feature or role from a server, use the command “Uninstall-WindowsFeature” followed by what you want to remove. For example, if you wanted to remove the feature WINS you would enter in “Uninstall-WIndowsFeature WINS”. This command however does not remove the payload.
3. To remove the payload the –Remove switch needs to be added. For example “Uninstall-WindowsFeature –Remove”. If the feature or role is installed, this will also uninstall the role or feature.
4. To see all the features on the Windows Server, run the command “Get-WindowsFeature”. This will show you all the features that are available on the Server and also if they are installed or not.

Windows Side-By-Side Store
In the Windows directory there is a folder called WinSxs. This contains all the files for the Windows Side by Side Store. The Windows Side by Side store was first introduced in Windows 98. It stores different versions of files in it. It was introduced to fix the following problem. When a dynamical linked library (DLL) is use by software, the software was first coded to use that particular version. This DLL may be later updated adding features and bug fixes which is normally a good thing. In some cases, a DLL may have a bug fixed that causes the software to crash. This is because the software was getting a result that was incorrect, however it was coded around this incorrect result. With multiple applications installed on the computer, certain applications may require different DLL versions in order to work. Finding the right set of DLL’s could be difficult. When an administrator was faced with this kind of problem it was often referred to as DLL hell.

In new versions of Windows, the side by side store contains roles and features in the operating system. When the operating system requires these files, for example a role is installed, the files are copied from the side by side store. This means that the side by side store can contain files that are not being used because that feature is not installed. These files can be removed.

When a file exists in the side by side store and also the operating system, the file is accessed in the same location on the hard disk. This means that the one file is stored once on the hard disk even though it can be accessed in multiple locations on the hard disk.

Demonstration removing all unused payloads
In order to remove all the payloads for roles and features that are not being used on the server, commands are run in Powershell that creates output for other commands. This will allow the unused features to be removed without removing roles or features that are installed.
1. The PowerShell command “Get-WindowsFeature” gets a list of all features installed. From this list, the features that are installed need to be removed. To do this, the data from the command is transferred to another command. This process is called piping and is done with the | symbol. The command that will receive this information is “Where-Object”. This command allows a list of items to be received and processed. In this case, a small script will be run on each item in the list. The list being a list of all features installed on that server. To do this, the parameter “-FilterScript” needs to be added. Following this, the script needs to be added in {}. The “$_” symbol states the current item. “.Installed” accesses the current item and gets the value for installed. Next you want to test what the value for installed is showing, “-eq $FALSE” is used. This indicates if not installed filter item. The whole command is “Get-WindowsFeature | where-object –FilterScript { $_.Installed –Eq $FALSE }
2. The previous command creates a list of features that are not currently installed. The next step is to use this list to uninstall all the features. The command to be added is “Uninstall-WindowsFeature -Remove” so the full command is “Get-WindowsFeature | Where-Object –FilterScript { $_.Installed –Eq $FALSE } | Uninstall-WindowsFeature –Remove”

Demonstration adding a feature on Demand
1. When you run Server Manager and attempt to install a feature that the system does not have the payload installed on the server, on the install screen you will get a warning message telling you that the install files could not be found.
2. At the bottom of the install screen is the option “Specify an alternative source path”. When this option is selected, the administrator can choose any location that they want that contains the require files.

Demonstration sharing the payload on the network
The payload files can be found on the install DVD. They are operating system specific.
1. Insert the DVD in the computer and copy the directory sources\sxs to the server.
2. Right click the directory you copied to the server and select “Share with” and specific people.
3. Once you have added the required permissions, finish the wizard and share the folder.

Demonstration Group Policy Configuration for payload location
1. To configure Group Policy, run GPEdit.msc to open Group Policy Management
2. Navigate to the key “Computer Configuration\Administrative Templates\System\Specify Settings for optional component installation and component repair”
3. It is just a matter of entering in the path that you want the server to look for the payload when it is not available.
4. There is also the option “Never attempt to download payload from Windows Update” if you want to ensure that the server never attempts to contact the internet in order to obtain the missing payload.
5. The second option “Contact Windows Update directory to download repair content instead of Windows Server Updates Services (WSUS)”.

Space Saving
Full install: 9103974400 8.47Gigabyte
Side by side Removed: 8107335680 7.55Gigabyte (10%)
Server core and side by side removed: 6283857920 5.85Gigabyte (30%)
On a base install removing the side by side store saves 10% of the drive space. Removing the GUI removes another 20%.

“Installing and Configuring Windows Server 2012 Exam Ref 70-410” pg 10 -11
“Configure Features on Demand in Windows Server” http://technet.microsoft.com/en-us/library/jj127275.aspx
“Uninstall-WindowsFeature” http://technet.microsoft.com/en-us/library/jj205471.aspx
“What is the WINSXS directory in Windows 2008 and Windows Vista and why is it so large?” http://blogs.technet.com/b/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx
“Side-by-side assembly” http://en.wikipedia.org/wiki/Side-by-side_assembly

Theme developed by TouchSize - Premium WordPress Themes and Websites