Configuring Windows Server 2008 R2 Roles via Powershell


The following commands are useful when

  • Open Powershell
  • Type “Import-Module servermanager” to import the servermanager module into powershell. Failure to do so will mean the following commands will not work.
  • To list the Roles type “Get-WindowsFeature“.

  • To install a Windows Role type “Add-WindowsFeature NAME”. NAME refers to the name of the Role listed under the Name column when the Get-WindowsFeature command was run.
  • To install multiple Roles at the same time simple put a comma between role names

E.g. Add-WindowsFeature DHCP, Print-Server

  • To remove an installed Role simply type “Remove-WindowsFeature NAME”

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s