Remove Roles and Features Not Installed on Windows Server 2012

In this tutorial, we want to teach you How To Remove all Roles and Features Not Installed on Windows Server 2012.

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).

Remove all Roles and Features Not Installed on Windows Server 2012

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.

To use the “Features on Demand” you need to “remove” the binaries required by any features that aren’t currently installed by your OS. You can remove them one by one, but this is a real drag.

So you can use the following command from your Windows PowerShell to remove the binaries for any non-installed features on your system:

get-windowsfeature | where-object -FilterScript { $_.InstallState -eq 'Available' } | remove-windowsfeature -remove
Features on Demand Removal Progress looks like this:
Remove roles and features progress

 

 

 

Note: 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 be downloaded from Windows Update over the Internet.

When your removal progress is completed. you will see:

Complete removal progress

After you’ve run this command you’ll need to have your windows install source available if you want to install any additional features. You might also need to specify an alternate source location when installing any future features.

Conclusion

At this point, you learn to Remove all Roles and Features Not Installed on Windows Server 2012.

Hope you enjoy it.

Please subscribe to us on Facebook, Twitter, and Instagram.

Also, you may be interested in these articles:

How To Install Node.js on Windows Server 2022 

How To Redirect www URLs To non-www and HTTP To HTTPS

Install and Configure WAMP on Windows Server 2019

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular