ANAVEM
Reference
Languagefr
List Installed Roles and Features Using PowerShell on Windows Server

List Installed Roles and Features Using PowerShell on Windows Server

Learn to efficiently identify and list all installed Windows roles and features on local and remote servers using PowerShell cmdlets with filtering techniques.

Emanuel DE ALMEIDAEmanuel DE ALMEIDA
March 17, 2026 15 min 8
mediumpowershell 8 steps 15 min

What PowerShell cmdlets are available for listing Windows Server roles and features?

The primary PowerShell cmdlet for listing installed roles and features on Windows Server is Get-WindowsFeature from the ServerManager module. This cmdlet remains unchanged as of Windows Server 2025 and supports both local and remote querying with comprehensive filtering options.

Let's start by verifying your PowerShell environment is ready. Open PowerShell as Administrator and check the ServerManager module availability.

Get-Module -ListAvailable ServerManager

This displays the ServerManager module version. On Windows Server 2025, you'll see version 2.0.0.0 or later. Import the module explicitly if it's not auto-loaded:

Import-Module ServerManager

Verification: Run Get-Command Get-WindowsFeature to confirm the cmdlet is available.

Related: How to Install and Configure DHCP Server on Windows Server

Related: Install Hyper-V on Windows Server Using 3 Different Methods

Related: How to Uninstall Internet Explorer from Windows Server

How do you list all available Windows Server roles and features using PowerShell?

Start by examining all roles and features on your local server. This gives you the complete inventory before applying any filters.

Get-WindowsFeature

This command displays three key columns: Name (short identifier), DisplayName (descriptive name), and InstallState (Available, Installed, or Removed). The output shows hundreds of features available on your Windows Server installation.

Pro tip: Pipe to Format-Table -AutoSize for better column alignment on wide displays, especially when working with long feature names.

Verification: Count total features with (Get-WindowsFeature).Count - expect 400+ items on a full Windows Server installation.

Implementation Guide

Full Procedure

01

Verify PowerShell and ServerManager Module

First, confirm your PowerShell environment is ready. Open PowerShell as Administrator and check the ServerManager module availability.

Get-Module -ListAvailable ServerManager

This displays the ServerManager module version. On Windows Server 2025, you'll see version 2.0.0.0 or later.

Import-Module ServerManager

Import the module explicitly if it's not auto-loaded. Verification: Run Get-Command Get-WindowsFeature to confirm the cmdlet is available.

02

List All Available Roles and Features

Start by examining all roles and features on your local server. This gives you the complete inventory before filtering.

Get-WindowsFeature

This command displays three key columns: Name (short identifier), DisplayName (descriptive name), and InstallState (Available, Installed, or Removed). The output shows hundreds of features.

Pro tip: Pipe to Format-Table -AutoSize for better column alignment on wide displays.

Verification: Count total features with (Get-WindowsFeature).Count - expect 400+ items on a full Windows Server installation.

03

Filter to Show Only Installed Features

Now filter the results to show only installed roles and features. This is the most common use case for server auditing.

Get-WindowsFeature | Where-Object InstallState -eq "Installed"

Alternative syntax using the shorthand:

Get-WindowsFeature | ? Installed

Both commands produce identical results. The second uses PowerShell's automatic boolean property evaluation.

Warning: Use exact case for InstallState values. PowerShell is case-sensitive for string comparisons in some contexts.

Verification: Compare the count of installed vs. total features: (Get-WindowsFeature | ? Installed).Count should be much smaller than the total.

04

Query Remote Servers for Installed Features

Extend your queries to remote servers using the ComputerName parameter. This requires proper WinRM configuration.

Get-WindowsFeature -ComputerName "DC01" | Where-Object Installed

For servers requiring specific credentials:

$cred = Get-Credential
Get-WindowsFeature -ComputerName "SRV02" -Credential $cred | Where-Object Installed

The Get-Credential cmdlet prompts for username and password securely.

Pro tip: Test connectivity first with Test-WSMan ServerName before running feature queries.

Verification: The output includes the same columns but queries the remote server. Check that PSComputerName property shows the target server name when using Invoke-Command alternatives.

05

Filter Specific Roles and Features with Wildcards

Use wildcard patterns to find specific technologies or feature groups. This is essential for focused server audits.

Get-WindowsFeature *Hyper-V* | Where-Object Installed

Search for web-related features:

Get-WindowsFeature *IIS*, *Web* | Where-Object Installed

Find all Active Directory components:

Get-WindowsFeature *AD*, *Domain* | Where-Object Installed

Verification: Each query returns only features matching the wildcard pattern. Use Get-WindowsFeature *Hyper-V* without the filter to see all Hyper-V features (installed and available).

06

Distinguish Between Roles and Features

Windows Server categorizes components as either Roles (server functions) or Features (supporting tools). Filter by FeatureType to separate them.

Get-WindowsFeature | Where-Object { $_.Installed -and $_.FeatureType -eq "Role" }

Show only installed Features (not Roles):

Get-WindowsFeature | Where-Object { $_.Installed -and $_.FeatureType -eq "Feature" }

Format the output for better readability:

Get-WindowsFeature | Where-Object { $_.Installed -and $_.FeatureType -eq "Role" } | Format-Table Name, DisplayName, FeatureType -AutoSize

Verification: Roles typically include services like "Web Server (IIS)", "DNS Server", while Features include tools like "PowerShell ISE", "Telnet Client".

07

Query Multiple Servers Simultaneously

Use Invoke-Command to query multiple servers concurrently, which is much faster than sequential queries.

$servers = @('SRV01', 'SRV02', 'DC01')
$results = Invoke-Command -ComputerName $servers -ScriptBlock {
    Get-WindowsFeature | Where-Object Installed
}

View results with server identification:

$results | Select-Object PSComputerName, Name, DisplayName, InstallState | Format-Table -AutoSize

For servers requiring credentials:

$cred = Get-Credential
$results = Invoke-Command -ComputerName $servers -Credential $cred -ScriptBlock {
    Get-WindowsFeature | Where-Object { $_.Installed -and $_.FeatureType -eq "Role" }
}
Pro tip: Use -AsJob parameter with Invoke-Command for very large server lists to run queries in the background.

Verification: Each result includes PSComputerName showing which server provided the data. Count unique servers: ($results | Select-Object PSComputerName -Unique).Count

08

Export Results to CSV for Documentation

Export your findings to CSV files for documentation, compliance, or further analysis in Excel.

Get-WindowsFeature | Where-Object Installed | Export-Csv -Path "C:\InstalledFeatures.csv" -NoTypeInformation

For multi-server exports with better formatting:

$servers = @('SRV01', 'SRV02')
$allFeatures = Invoke-Command -ComputerName $servers -ScriptBlock {
    Get-WindowsFeature | Where-Object Installed | Select-Object Name, DisplayName, InstallState, FeatureType
}
$allFeatures | Select-Object PSComputerName, Name, DisplayName, InstallState, FeatureType | Export-Csv -Path "C:\MultiServerFeatures.csv" -NoTypeInformation

Create separate files for roles and features:

$installed = Get-WindowsFeature | Where-Object Installed
$installed | Where-Object { $_.FeatureType -eq "Role" } | Export-Csv -Path "C:\InstalledRoles.csv" -NoTypeInformation
$installed | Where-Object { $_.FeatureType -eq "Feature" } | Export-Csv -Path "C:\InstalledFeatures.csv" -NoTypeInformation

Verification: Open the CSV files in Excel or use Import-Csv "C:\InstalledFeatures.csv" | Measure-Object to count exported records.

Frequently Asked Questions

Can Get-WindowsFeature work on Windows 10 or Windows 11 client machines?+
No, Get-WindowsFeature is only available on Windows Server operating systems. For Windows client machines, you need to install RSAT (Remote Server Administration Tools) using Add-WindowsCapability -Online -Name Rsat.ServerManager.Tools~~~~0.0.1.0, which allows you to manage remote servers but not query local client features.
What's the difference between InstallState values Available, Installed, and Removed in Get-WindowsFeature?+
Available means the feature is not installed but can be installed from the local source files. Installed means the feature is currently active and functional. Removed means the feature was previously installed but has been uninstalled, and its source files have been removed from the local system, requiring external media or Windows Update to reinstall.
How do you handle authentication when querying multiple remote servers with different credentials?+
Use Get-Credential to create credential objects for different domains or accounts, then pass them to the -Credential parameter. For multiple credential sets, create separate Invoke-Command sessions: $cred1 = Get-Credential domain1\user; $cred2 = Get-Credential domain2\user; then run separate commands for each credential set and combine results.
Why does Get-WindowsFeature sometimes return incomplete results on Server Core installations?+
Server Core installations have a minimal feature set and some GUI-related features are not applicable. Additionally, certain features may not be properly enumerated if the ServerManager module dependencies are missing. Use Get-WindowsOptionalFeature for Core-specific features or verify the ServerManager module is fully installed with Import-Module ServerManager -Force.
What PowerShell execution policy settings are required for Get-WindowsFeature to work properly?+
Get-WindowsFeature itself doesn't require specific execution policy changes since it's a built-in cmdlet. However, if you're running scripts that include Get-WindowsFeature commands, you may need to set the execution policy to RemoteSigned or Unrestricted using Set-ExecutionPolicy. For remote operations, ensure the target servers allow remote PowerShell execution via Enable-PSRemoting.
Emanuel DE ALMEIDA
Written by

Emanuel DE ALMEIDA

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

You must be logged in to comment.

Loading comments...