Install AD DS, DNS, and DHCP using Powershell on Windows Server 2016

malwaremily
6 min readDec 2, 2018

This article serves as a guide to installing and configuring roles on Windows 2016 servers using powershell.

To begin, right-click the Windows Powershell taskbar icon and select “Run as Administrator”. To view Windows features and statuses enter this command into the console:

Get-WindowsFeature

To install an individual feature the following command syntax is used:

Install-WindowsFeature -Name [feature_name] -[Options] 

Active Directory Role

We will begin by installing the Active Directory role using the following:

Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools

To view the available module commands related to AD DS use the following:

Get-Command -Module ADDSDeployment

First, the root domain is installed:

Install-ADDSForest -DomainName “corp.momco.com”

Note that you may see several error messages and this is okay. Watch the banner for update…

--

--

malwaremily
malwaremily

Written by malwaremily

I enjoy researching defensive security topics.

No responses yet