Installing a Server Role and its required features using PowerShell

Share this:

Using the GUI is awesome when you have to do the process a couple of times, but if you have to repeat that several times, then PowerShell is the way to go. In this Tutorial we are going over the process to show how to install the a role (DHCP) and its features using PowerShell.


When using the GUI, we can always select the role using Add Roles and Features Wizard and a dialog box asking to add the additional features will be displayed, as shown in the image below.


If we want to repeat the same process with a single PowerShell line we can use the following cmdlet:

Add-WindowsFeature DHCP –IncludeManagementTools


Written by Anderson Patricio

Anderson Patricio is a Canadian Exchange Server MVP and MCSM (Solutions Master) and he contributes to the Microsoft Community with articles, tutorials, blog posts, forums and book reviews. He is a regular contributor at, and (Portuguese).