How to Display a Feature List with Subfeatures using Get-WindowsFeature in PowerShell

Abstract: Resolve the difficulty of viewing Windows feature hierarchies by using Get-WindowsFeature to display parent roles and their subfeatures clearly.

Created: 2026-10-02 by
To display a comprehensive list of Windows features and their subfeatures using PowerShell, you should use the Get-WindowsFeature cmdlet. By default, this command returns all installed and available features on the server. To specifically view hierarchical relationships or filter for specific roles like Hyper-V, you can pipe the output to Where-Object or format it with Format-Table. This approach ensures you see both parent roles and their dependent components clearly in the console.

Understanding Get-WindowsFeature Basics

The Get-WindowsFeature cmdlet is part of the ServerManager module, which is pre-installed on Windows Server operating systems. When you run this command without any parameters, it queries the local machine's component store and registry to retrieve a list of all possible features. The output includes several key columns: Name, which is the technical identifier used by PowerShell; Display Name, which is the human-readable label shown in the GUI; and Installed, a boolean value indicating if the feature is currently active. For administrators managing Windows Server 2019, understanding this structure is vital because many features are nested. For example, the "Hyper-V" role contains subfeatures like Hyper-V Management Tools and Hyper-V Platform Service. Without proper formatting, the raw output can be overwhelming. Therefore, the first step is often to limit the scope of the query to make the data digestible.

Filtering Features for Specific Roles

One of the most common tasks is isolating a specific role to inspect its subfeatures. You can achieve this by using the -Name parameter or by filtering the results after retrieval. For instance, if you want to see all subfeatures related to Hyper-V, you can run the following command:
Get-WindowsFeature -Name *Hyper-V*
This command uses wildcard characters to match any feature name containing "Hyper-V". The result will show the main Hyper-V role along with every associated subfeature. If you need to verify the installation state of these specific items, look at the Installed column. A checkmark indicates an active installation, while a blank space means it is available but not installed. If you prefer a more programmatic approach, you can filter the entire list using Where-Object. This is useful when you are scripting automated checks. The following example filters for features where the name starts with "Hyper-V":
Get-WindowsFeature | Where-Object { $_.Name -like "Hyper-V*" }
This method provides greater flexibility, allowing you to combine multiple conditions. For example, you could filter for features that are not yet installed but are required for a specific setup. This technique is particularly helpful when preparing a new server deployment and you need to ensure all prerequisites are accounted for before proceeding.

Formatting the Output for Readability

Raw text output from Get-WindowsFeature can sometimes truncate long display names or make it difficult to distinguish between parent roles and child features. To improve readability, especially when exporting reports or viewing them in a remote session, you should use Format-Table. This cmdlet allows you to select specific columns and adjust the width of the display. A common pattern is to display the Name, Display Name, and Installed status side-by-side:
Get-WindowsFeature | Format-Table -AutoSize Name, DisplayName, Installed
The -AutoSize flag ensures that the table adjusts to fit your console window, preventing horizontal scrolling issues. This is particularly important when dealing with a large number of features. Additionally, you can sort the output by the Installed property to quickly identify which features are active versus those that are dormant. Sorting helps in auditing the server configuration efficiently. For deeper analysis, you might want to export this data to a CSV file for further review in Excel. Using Export-Csv preserves the structure of the data:
Get-WindowsFeature | Select-Object Name, DisplayName, Installed | Export-Csv -Path "C:\Features.csv" -NoTypeInformation
This creates a structured dataset that can be analyzed offline. It is a best practice to maintain such records for compliance and documentation purposes. If you are working in a virtualized environment, checking feature states is crucial before provisioning new VMs. You might find it useful to cross-reference this with guides on Enable Auto Logon in Windows 10 VM inside Hyper-V using PowerShell to ensure your host environment is fully configured.

Common Use Cases and Best Practices

Administrators often use Get-WindowsFeature during initial server setup or routine maintenance. One frequent scenario is verifying that a specific update or security patch has enabled a particular feature. Another is troubleshooting performance issues. If you suspect that unnecessary features are running in the background, listing them helps identify candidates for removal. However, caution is advised when removing features. Always verify dependencies before uninstalling a role. Removing a parent feature will automatically remove its subfeatures, but the reverse is not always true. Some subfeatures may be shared across different roles. Therefore, it is wise to document your changes. If you experience sluggish performance after making changes, refer to resources on Troubleshooting Sluggish Performance of PowerShell Scripts in Hyper-V on Windows 10 to diagnose potential bottlenecks. Another best practice is to use the -ComputerName parameter if you need to check features on a remote server. This requires appropriate permissions and WinRM configuration. It streamlines management across multiple servers without needing to log into each one individually. This capability is essential for enterprise environments where consistency is key.

Frequently Asked Questions

How do I check if a specific subfeature is installed?

You can check the installation status of a specific feature by piping the output of Get-WindowsFeature to Where-Object and filtering by the exact name. Look for the Installed column in the result, which will show a checkmark if the feature is present.

Can I use Get-WindowsFeature on Windows 10?

No, Get-WindowsFeature is only available on Windows Server operating systems. On client versions like Windows 10, you must use Get-WindowsOptionalFeature instead, as the underlying component store structure differs.

Why is my Get-WindowsFeature output truncated?

The default output may truncate long display names or exceed the console width. Using Format-Table -AutoSize or exporting to CSV resolves this by adjusting the layout or saving the full data string.

How do I remove a feature using PowerShell?

To remove a feature, use the Remove-WindowsFeature cmdlet followed by the feature name. Ensure you have administrative privileges and confirm that no critical dependencies rely on the feature being removed.

Is there a way to install multiple features at once?

Yes, you can pass an array of feature names to the Add-WindowsFeature cmdlet. This allows for bulk installation, which is efficient for setting up new servers with standard configurations.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More