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.
Documentation: Microsoft Learn — get-windowsfeature
Syntax
Try it
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.
Examples
List only the installed roles and features
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
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
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.
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