A: Windows Server 2012 allows for roles and features to be removed from the Windows side-by-side assembly, if they are known to not be needed. This can be done to reduce the disk footprint of a server. (Typically all roles and features are copied to disk even if not installed, to enable fast role and feature installation and consistent patching).

To actually remove all roles and features not installed on a server from the disk, you can use the Windows PowerShell command below. Note that this is not something you should typically do--because later, if you add a removed role or feature, then the bits (e.g., the executables, DLLs) will by default downloaded from Windows Update over the Internet.

Here's the command:

Get-WindowsFeature | Where-Object {$_.Installed -match "False"} | Uninstall-WindowsFeature -Remove

Mark Minasi has been writing a series about using PowerShell. Check out "Automating PowerShell Reports Part 1."