Installing Active Directory with PowerShell

PowerShell has grown a lot over the last decade and now you are able to control a Domain Controller with a few simple commands. This is very exciting and this guide will help all of you IT Pros. Lets get started.

 

First you will have to install the Active Directory Domain Service Role.

Make sure your PowerShell has the elevated rights and type in the following command:

Get-WindowsFeature AD-Domain-Services | Install-WindowsFeature

Now it is time to do the Prerequisites Check (PC) which will alert you with suggested repair options, and inform you of security changes.

Advertisements

Setup Active Directory Domain Service on Windows Server 2012 or R2

You have installed Active Directory Domain Service role. Now it is time to setup the AD.

Navigate to the Server Manger Dashboard and you should see a flag with a yellow triangle. Click on the flag. Server Manager Dashboard with AD

Now a drop down menu appeared. Select Promote this Server to a domain controller The FLAG

Select add a new forest option. On the same window you have to add your domain name and click Next.