AntiMalware Status

Checking Server Roles with PowerShell

Quick note how to check your [easyazon_link identifier=”1118289420″ locale=”US” tag=”wn0d5-20″] Windows Server 2012 R2 [/easyazon_link] for installed features and roles with [easyazon_link identifier=”1782173552″ locale=”US” tag=”wn0d5-20″] PowerShell [/easyazon_link] one-liners. If you are on the server physically,  you can just use the Server Manager to check the Roles. Here is the [easyazon_link identifier=”B016XEZ0LA” locale=”US” tag=”wn0d5-20″] PowerShell [/easyazon_link] 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 [easyazon_link identifier=”178439307X” locale=”US” tag=”wn0d5-20″] Windows Server 2012 R2 [/easyazon_link]. If you want to check this also remotely, you can do this with this command in [easyazon_link identifier=”1617292184″ locale=”US” tag=”wn0d5-20″] PowerShell [/easyazon_link].

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!
[easyazon_image align=”none” height=”110″ identifier=”178439307X” locale=”US” src=”http://blog.technotesdesk.com/wp-content/uploads/2016/03/51gnIFGGd2L._SL110_.jpg” tag=”wn0d5-20″ width=”89″]

Leave a Reply