Get installed Roles and Feature on Server

Sometimes when you want to check what type of roles or features are installed on the server, the option is to open server manager and go over to all installed components.

What will you do if you would like to export roles and features on several servers

Two options:

  • Any type of script option (Powershell, BATCH, VBS)
  • SCCM

I would like to show you Powershell option.

 

For installed Role:

 

Get-WindowsFeature | Where-Object {($_.InstallState -eq “installed”) -and ($_.FeatureType -eq “Role”)} | select name,InstallState,FeatureType

 

PowershellAD

For Role Service:

Get-WindowsFeature | Where-Object {($_.InstallState -eq “installed”) -and ($_.FeatureType -eq “Role Service”)} | select name,InstallState,FeatureType

Powershell

For installed feature:

Get-WindowsFeature | Where-Object {($_.InstallState -eq “installed”) -and ($_.FeatureType -eq “feature”)} | select name,InstallState,FeatureType

FeaturesPowershell

About Meir Peleg 337 Articles
My name is Meir Peleg, (Born 30/04/1991) live in ISRAEL. Live and breath IT world. Microsoft MVP Windows IT & VMware vExpert.