Tuesday, January 1, 2013

Windows Server 2012 and removing binaries from the local disk using Features on Demand

By default, the files required for adding roles and features within Windows Server 2012 are stored under C:\Windows\WinSxS.  An option is available via PowerShell to remove certain binary files from this folder.  If a particular file is required again in the future, the operating system will attempt to obtain it via Windows Update.  One advantage is less maintenance; even if a role or feature is not being used, future updates will need to be installed to patch the binary files in question.  It can also help if free disk space on the system partition is an issue.

To remove the binary files from the local disk, use the switch –Remove with the Uninstall-WindowsFeature cmdlet.  The install state column using the Get-WindowsFeature cmdlet should display a value of “removed” if the request was successful.

windows_server_2012_features_ondemand_1

Files should be missing from the WinSxS folder if compared between a before and after snapshot.

windows_server_2012_features_ondemand_2

No comments:

Post a Comment