Windows Features CMD: How to Turn Windows Features On or Off via Command Line

This article will teach you how to:

  • Quickly enable/disable Windows features via Control Panel.
  • Use DISM for advanced feature management.
  • PowerShell offers flexible control (Windows 8.1+).
  • Automate changes with commands & scripts.

Multiple ways for enabling and disabling Windows features

You can enable or disable Windows features using Control Panel, DISM, or PowerShell. Control Panel is the easiest method, while DISM and PowerShell provide advanced options, especially for automation.

These tools help customize Windows by adding or removing optional components like Hyper-V, IIS, or .NET Framework.

Check the steps below to learn how to do it properly.

Accessing Windows Features via Control Panel

You can view available Windows features by navigating to Control Panel ? Programs and Features and selecting “Turn Windows features on or off” or by typing OptionalFeatures into the Start menu. This interface displays features such as .NET Framework, Internet Explorer, Hyper-V, Telnet, Windows Media Player, and more.

Windows Optional Features List

If a feature is needed, simply check the box and click OK to install it; unchecking removes the feature. Fewer installed features can help reduce potential issues.


Managing Windows Features via Command Prompt (DISM)

Overview of DISM

DISM (Deployment Image Servicing and Management) is a command-line tool available in Windows 7, 8.1, and 10. It lets you view, enable, or disable Windows features and is also used for driver or update injections into WIM images.

  • Step 1: Open a Command Prompt with administrative privileges (type cmd, then press Ctrl+Shift+Enter).
  • Step 2: List all available features with:bashCopyEditDISM /online /get-features /format:table | more This command displays a paginated, table-formatted list of features.
DISM Get Features

Filtering and Detailed Information

To filter the list to only show enabled or disabled features, modify the command:

bashCopyEditDISM /online /get-features /format:table | find "Enabled" | more
DISM /online /get-features /format:table | find "Disabled" | more

For detailed information about a specific feature:

bashCopyEditDISM /online /get-featureinfo /featurename:[feature name]

Replace [feature name] with the exact, case-sensitive name as displayed.

DISM Feature Info

Enabling and Disabling Features with DISM

Enable or disable features using these commands:

bashCopyEditDISM /online /enable-feature /featurename:[feature name]
DISM /online /disable-feature /featurename:[feature name]

You can append multiple /FeatureName:[feature name] arguments on the same line to modify several features at once. For more technical details, refer to the Microsoft Technet reference.

DISM Disable Feature

Managing Windows Features via PowerShell

PowerShell Optional Features in Windows 8.1 and 10

PowerShell provides integrated cmdlets to manage Windows features. Run PowerShell as an administrator for these commands to work.

  • View Features:arduinoCopyEditget-windowsoptionalfeature -online | ft | more The -online parameter targets the local system; ft formats the output as a table.
PowerShell Features List
  • Filter by State:sqlCopyEditget-windowsoptionalfeature -online | where state -like disabled* | ft | more get-windowsoptionalfeature -online | where state -like enabled* | ft | more
  • Detailed Information:pgsqlCopyEditget-windowsoptionalfeature -online -featurename [feature name] Wildcards (e.g., *media*) work for listing multiple related features.
  • Enable/Disable Features:pgsqlCopyEditenable-windowsoptionalfeature -online -featureName [feature name] -all disable-windowsoptionalfeature -online -featureName [feature name] The -all flag automatically installs any prerequisite features.
Enable PowerShell Feature

Example: To enable all Hyper-V features without rebooting:

pgsqlCopyEditget-windowsoptionalfeature -online -featurename *hyper-v* | enable-windowsoptionalfeature -online -norestart

PowerShell Optional Features in Windows 7

Windows 7’s PowerShell does not natively support modifying optional features. To add this capability, download and install the PSClientManager module from Codeplex.

  1. Download and Install PSClientManager:
    Download PSClientManager
  2. Run the Following Commands (if needed):mathematicaCopyEditSet-ExecutionPolicy RemoteSigned Import-Module PSClientManager
  3. Managing Features:
    • View Features:sqlCopyEditGet-ClientFeature | more
    • Filter Features:vbnetCopyEditGet-ClientFeature -name *string* Get-ClientFeature -state [disabled/enabled] | more
    • Enable/Disable Features:pgsqlCopyEditAdd-ClientFeature -Name [feature name] Remove-ClientFeature -Name [feature name]

Note: Feature names are case and space sensitive in PSClientManager. Some commands like Get-ClientFeatureInfo may not work reliably.

PowerShell Module Error

Conclusion

Managing Windows features can be done easily through the Control Panel for basic needs.

For advanced users, DISM and PowerShell offer powerful command-line options to view, enable, and disable features—ideal for automation or remote administration.

Learn how to detect non-Windows services, or explore how to enable and access disabled buttons and checkboxes.

For task management tips, read about permanently setting process priority in Task Manager or batch terminating system services and processes.

If quicker file operations interest you, check out this collection of portable file managers.

10 Comments - Write a Comment

  1. bhavesh 2 years ago
  2. Michael Balloni 4 years ago
  3. Thao Nguyen 5 years ago
  4. Ajinkya Bhosale 6 years ago
  5. advdn1031 8 years ago
  6. Tim 8 years ago
  7. ahmadyo 8 years ago
  8. Pankaj Patel 13 years ago
  9. XPMan 13 years ago
  10. ayak 13 years ago

Leave a Reply

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

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.