PowerShell

Windows Server: List all installed Roles and Features using PowerShell

If you install Roles and Features with PowerShell, Install-WindowsFeature is your friend. Get-Windowsfeature gets information about installed or available Server Roles. This blog post shows how to get a list of all installed Roles on Windows Server 2012 or Windows Server 2016.

Get-WindowsFeature

Running without parameters, Get-WindowsFeature gets information about all Server Roles and Features. We are looking for the attribute installstate. Possible values are: Installed, Available, Removed.

Unbenannt.PNG

List all installed Features and Roles

Let´s move on. I am logged on Server03, which is a Member Server of my Domain. I search for all installed Roles on the localhost.


Get-WindowsFeature | Where-Object {$_. installstate -eq "installed"} | Format-List Name,Installstate | more

Unbenannt.PNG

List all roles and Features on a Remote Host

As  mentioned, I am logged on Server03. Let´s find all installed Roles and Features on the remote computer dc01. Server03 and dc01 are in the same domain. I use Get-WindowsFeature with the parameter -ComputerName.


Get-WindowsFeature -ComputerName dc01 | Where-Object {$_. installstate -eq "installed"} | Format-List Name,Installstate | more

Unbenannt.PNG

See also

For installing and listing Windows Server Roles and Features you can also establish a PowerShell Remote Session, which i described in this article: How to configure Trusted Hosts for PowerShell Remote Sessions.

3 replies »

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s