Windows Server 2012 – Features On Demand allows you to slim down your Windows Server installation by removing the binary files that make it possible to install unused features. Removing files required to install unused features reduces the security footprint of Windows Server 2012 and the amount of available exploits by up to 90%. Features used by Features on Demand can later be restored from either Windows Update or a WIM source file from the Windows Server 2012 installation media.
To remove features with Features on Demand, use Windows PowerShell either against the current computer, a remote computer or against a Windows virtual hard disk (VHDx).
To remove Windows features using Features On Demand against a VHDx file, use the following PowerShell command:
Uninstall-WindowsFeature -name <<FeatureName>> -vhd “<<VHDx filepath>>” -Remove
To remove the binary files on the local machine, use the following command:
Uninstall-WindowsFeature -name <<FeatureName>> -Remove
It’s the Remove flag that initiates the Features on Demand command to remove the binary files, otherwise this command would simply uninstall the specified feature.