How to Quickly List Installed Roles and Features using PowerShell

In this tutorial, you will learn how to get a list of all installed roles and features using PowerShell.

This will only work on Windows server operating system and works for local and remote computers.

Let’s get started


The get-windowsfeature PowerShell command will get information about installed and available features and roles.

The following command will list all server roles and features:

get-windowsfeature command

As you can see in the screenshot above the command gets the display name, name, and the install state of services and roles on my local computer. The install state values can be installed, available and removed.

Display only Installed Features and Roles

You probably just want a list of installed roles and features, this can be done with the following command:

 Get-WindowsFeature | Where-Object {$_. installstate -eq "installed"}
filter list by installed state

This looks much better, now it’s a list of only the features that are in the install state. What I did was filter the list based on the install state to list only those that are installed.

The display name and name are basically the same so I’m going to remove the Display name column.

 Get-WindowsFeature | Where-Object {$_. installstate -eq "installed"} | select Name,Installstate
filtered list of features

That is much easier to read.

Get Installed Roles and Features on a Remote Computer

Now let’s look at how to get installed roles for a remote computer. I’m on DC2 and I’m going to list the roles for DC1.

The command is exactly the same you just need to add -ComputerName PCNAME to the command.

Get-WindowsFeature -ComputerName dc1 | Where-Object {$_. installstate -eq "installed"} | select Name,Installstate
installed features on remote computer

Now I’ve got a list of everything installed on my dc1 server.

If you need to find a specific role or feature you can type in the name or do a wildcard search. In the below example I’m going to do a wildcard search for Active Directory roles. I’m not sure of the name so I’ll search for *ad*

get-windowsfeature *ad*
wildcard search

You can see the wildcard search listed everything that has “ad” in the name. Pretty cool option to quickly search for roles and features.

3 thoughts on “How to Quickly List Installed Roles and Features using PowerShell”

Leave a Comment