Description

This PowerShell one-liner will import the ServerManager module and show Windows roles and features that are currently installed.

Script

PowerShell
Edit|Remove
Import-module servermanager ; Get-WindowsFeature | where-object {$_.Installed -eq $True| format-list DisplayName 
 
 To just return True or False if a specific role or feature is installed, you can use this (which uses the Hyper-V role as an example):
PowerShell
Edit|Remove
Import-module servermanager ; (Get-WindowsFeature -name hyper-v).Installed  
 
For more information, see: