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

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at,, and Anderson (Portuguese).

Related Post

Configuring High Availability on the DHCP Server r... Hello folks, I wrote an article for explaining the process to configure the DHCP Server role in Windows Server 2016. Windows Serve...