While that is sufficient most of the time, administrators may use PowerShell as well to manage optional features of the Windows operating system.

The following guide provides you with an overview on how that works on Windows 10. Note that this may not work on previous versions of Windows such as Windows 7.

Windows PowerShell: install optional features

You need an elevated PowerShell for the following commands. Tap on the Windows-key, type powershell, hold down the Ctrl-key and the Shift-key, and tap on the Enter-key to open a PowerShell prompt with administrative privileges.

List all optional features and their status

The first thing you may want to do, at least when you are new to using the command, is to display the list of features that are available.

Run get-windowsoptionalfeature -online to list all available feature names and their states on the computer system. The state is either enabled or disabled.

Note: the -online parameter means that the actions are run on the current device.

While it is easy enough to identify some features by the feature name, it is not easy for all of them.

Display information about features

You may use the -featurename Example parameter to display detailed information about a feature that you are interested in.

The command get-windowsoptionalfeature -online -featurename NetFx3 for instance reveals that this installs the .Net Framework 3.5 on the system. There is also an Internet link provided that you may click on to look up additional information online.

Enable or disable an optional feature

You may use PowerShell commands to enable or disable optional features on a Windows 10 machine.

The commands Enable-WindowsOptionalFeature -FeatureName and Disable-WindowsOptionalFeature -FeatureName are used for that.

To give you two examples to show you how that works:

Enable-WindowsOptionalFeature -Online -FeatureName "NetFx3" -All -- This command installs the Net Framework 3.5 on the computer the command is run on.

The -All parameter tells Windows to install any dependencies as well. So, if a parent feature is required for the installation of the selected feature, it is installed as well. Note: Disable does not support the -All parameter.

The following guide provides you with an overview on how to manage, enable or disable optional features using PowerShell on Windows 10.

Author

Martin Brinkmann

Publisher

Ghacks Technology News

Logo

Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

About Martin Brinkmann

Martin Brinkmann is a journalist from Germany who founded Ghacks Technology News Back in 2005. He is passionate about all things tech and knows the Internet and computers like the back of his hand.You can follow Martin on Facebook or Twitter

This is only on your end, usually when ipconfig /flushdns cache is or was used it takes time for dnscache to resolve the list. Instead of using MS own DNSCache I highly recommend to use Unbound instead (unbound.net).

Advertisement

About gHacks

Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.