PowerShell Genie

Get-WindowsFeature

Use Get-WindowsFeature to list the roles and features installed on a Windows Server — and to check whether a role like AD DS or Web Server is present.

Command 3 min read Windows PowerShell 5.1 · Windows Server only

Documentation: Microsoft Learn — get-windowsfeature

Syntax

1PS> Get-WindowsFeature [[-Name] <String[]>] [-ComputerName <String>] [-Credential <PSCredential>] [-Vhd <String>] [<CommonParameters>]

Try it

Windows PowerShell

PowerShell example · browser support is limited.

Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.

Interactive simulation · fictional data

Examples

List only the installed roles and features

1PS> Get-WindowsFeature | Where-Object Installed
Show reference output

Illustrative output · values vary by environment

Display Name                                            Name                       Install State
------------                                            ----                       -------------
[X] File and Storage Services                             FileAndStorage-Services  Installed
[X] Storage Services                                      Storage-Services         Installed

Check whether one role is installed

1PS> Get-WindowsFeature -Name AD-Domain-Services
Show reference output

Illustrative output · values vary by environment

Display Name                                            Name               Install State
------------                                            ----               -------------
[ ] Active Directory Domain Services                      AD-Domain-Services Available

Search roles by wildcard

1PS> Get-WindowsFeature *Web*
Show reference output

Illustrative output · values vary by environment

Display Name                                            Name                       Install State
------------                                            ----                       -------------
[ ] Web Server (IIS)                                      Web-Server                 Available
[ ] Web Server                                            Web-WebServer              Available

Parameters

Parameter definitions:

  • -Name — Role or feature names to check. Accepts wildcards.
  • -ComputerName — Checks a remote server instead of the local one.
  • -Vhd — Checks roles inside an offline VHD file instead of a running server.

Microsoft Learn — get-windowsfeature

Server only, and only in Windows PowerShell

Get-WindowsFeature runs on Windows Server, not on Windows 10 or 11 desktops. On a desktop you manage optional features with Get-WindowsOptionalFeature instead, which is a different cmdlet with different names.

The cmdlet lives in the ServerManager module and is a Windows PowerShell 5.1 cmdlet. It is not available in PowerShell 7 without the WindowsCompatibility module, so feature-install scripts usually still target 5.1.

Install state has three values: Installed, Available, and Removed. Removed means the feature's files were stripped from the image and you need installation media or Windows Update as a source to bring it back.

Install a role with Install-WindowsFeature

Check the related service with Get-Service

Updated 25 October 2026. Browser outputs are fictional; check the installed module help for your environment.

Recap

Get-WindowsFeature Use Get-WindowsFeature to list the roles and features installed on a Windows Server — and to check whether a role like AD DS or Web Server is present.

Next: Install Windowsfeature
Genie guideGet-WindowsFeature

Get-WindowsFeature lists every server role and feature with its install state: find which roles are installed, check a specific role before installing it, and audit servers against a baseline. The console below is pre-loaded — run it, then change a value and run it again.