How to Turn on or off Windows Features Using PowerShell?

Windows 10 included many optional features, which you can enable or disable based on your requirements. These features are known as optional features. Most of these features are intended for business networks and servers, Enabling all the features will take up more space on your hard drive. And most of the windows features are disabled by default. For example, Hyper V is a windows optional feature which is disabled by default. And based on your requirement you can enable this feature. Enabling all the features will slower your system performance.

To Turn on or off any windows features you can navigate to Programs and Features and from the left-hand side choose Turn on or off Windows Features. This will take you to the Windows Optional features page. This method is very easy and Straight forward, if you want to write a PowerShell script to enable or disable the windows feature then you can use the following method. This article will guide you to Turn on or off Windows Features Using PowerShell.

Table of Contents

Turn on or off Windows Features Using PowerShell:

Open PowerShell in elevated mode.

Now first before proceeding you need to know the list of Windows Features Names, to know that type the following command.

Get-WindowsOptionalFeature –Online

This command will list all the available Windows Features name and their state.

List windows optional features

If you want to get information about any specific windows features, then type the following command.

Get-WindowsOptionalFeature -Online -FeatureName *Type feature name*

If you know the feature name then replace it in the command while executing.

To Enable:

Type the following command to enable any Windows Optional Feature.

Enable-WindowsOptionalFeature -Online -FeatureName “Feature name” –all

Replace the actual feature name in the command.

Example: Enable-WindowsOptionalFeature -Online -FeatureName “TelnetClient” –all

enable Windows Features Using PowerShell

To Disable:

Type the following command to Disable any Windows Optional Feature.

Disable-WindowsOptionalFeature -Online -FeatureName “Feature name”

Replace the actual feature name in the command.

Read Also: How to Add or Remove Optional Features using Windows PowerShell?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top