Share via


Create a New Server 2012 AD Forest Using Powershell

Here are some simple step by step instructions for creating a new Active Directory Forest using Server 2012 and Windows PowerShell.

  1. Launch powershell from the server you are setting up as your first DC in the new forest

  1. Install the windows roles and features for Active Directory Domain Services using the command 

    Add-WindowsFeature -name ad-domain-services -IncludeManagementTools

  1. Once the role is instealled, you are ready to create the new forest. Use this command to configure the new forest

   Install-ADDSForest -DomainName "labdomain.com" -ForestMode 5 -DomainMode 5

This will install a new AD Forest called labdomain.com with forest functional, and domain functional mode of Server 2012. If you want to use use a different functional level you can change the modes to suit your requirements as shown below:

2003 = 2
2008 = 3
2008R2 = 4
2012 = 5

You will be prompted for a safemode password - this will be your AD recovery password to you need something complex, and keep it secure.

  1. Confirm you want to install AD and configure this server as a domain controller by clicking Y. Once complete the server will reboot and your server will be the first domain controller in the new forest.