AntiMalware Status

Checking Server Roles with PowerShell

Quick note how to check your Windows Server 2012 R2 for installed features and roles with PowerShell one-liners. If you are on the server physically,  you can just use the Server Manager to check the Roles. Here is the PowerShell command for you to use instead of the GUI.

Import-module servermanager ; Get-WindowsFeature | where-object {$_.Installed -eq $True} | format-list DisplayName

And you will get nice formatted output on your screen with all installed Features on the Windows Server 2012 R2. If you want to check this also remotely, you can do this with this command in PowerShell.

Get-WindowsFeature -ComputerName HQDC1 | Where-Object InstallState -eq Installed

In this case, you have to specify the server name and make sure you have enough permission to access the server.

Enjoy!

Leave a Reply