You are on page 1of 29

Install a New Windows Server 2012 Active Directory Forest (Level 200)

1 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

Install a New Windows Server 2012 Active Directory


Forest (Level 200)
Applies To: Windows Server Technical Preview

This topic explains the new Windows Server 2012 Active Directory Domain Services domain controller promotion feature at an
introductory level. In Windows Server 2012, AD DS replaces the Dcpromo tool with a Server Manager and Windows
PowerShell-based deployment system.
Active Directory Domain Services Simplified Administration (install-a-new-windows-server-2012-active-directory-forest-level-200-#BKMK_SimplifiedAdmin)
Technical Overview (install-a-new-windows-server-2012-active-directory-forest--level-200-#BKMK_TechOverview)
Deploying a Forest with Server Manager (install-a-new-windows-server-2012-active-directory-forest--level200-#BKMK_SMForest)
Deploying a Forest with Windows PowerShell (install-a-new-windows-server-2012-active-directory-forest--level200-#BKMK_PSForest)

Active Directory Domain Services Simplified Administration


Windows Server 2012 introduces the next generation of Active Directory Domain Services Simplified Administration, and is the
most radical domain re-envisioning since Windows 2000 Server. AD DS Simplified Administration takes lessons learned from
twelve years of Active Directory and makes a more supportable, more flexible, more intuitive administrative experience for
architects and administrators. This meant creating new versions of existing technologies as well as extending the capabilities of
components released in Windows Server 2008 R2.

What Is AD DS Simplified Administration?


AD DS Simplified Administration is a reimagining of domain deployment. Some of those features include:
AD DS role deployment is now part of the new Server Manager architecture and allows remote installation.
The AD DS deployment and configuration engine is now Windows PowerShell, even when using a graphical setup.
Promotion now includes prerequisite checking that validates forest and domain readiness for the new domain controller,
lowering the chance of failed promotions.
The Windows Server 2012 forest functional level does not implement new features and domain functional level is required
only for a subset of new Kerberos features, relieving administrators of the frequent need for a homogenous domain
controller environment.

Purpose and Benefits


These changes may appear more complex, not simpler. In redesigning the AD DS deployment process though, there was
opportunity to coalesce many steps and best practices into fewer, easier actions. This means, for example, that the graphical
configuration of a new replica domain controller is now eight dialogs rather than the previous twelve. Creating a new Active
Directory forest requires a single Windows PowerShell command with only one argument: the name of the domain.
Why is there such an emphasis on Windows PowerShell in Windows Server 2012? As distributed computing evolves, Windows
PowerShell allows a single engine for configuration and maintenance from both graphical and command-line interfaces. It
permits fully featured scripting of any component with the same first class citizenship for an IT Professional that an API grants to
developers. As cloud-based computing becomes ubiquitous, Windows PowerShell also finally brings the ability to remotely

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

2 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

administer a server, where a computer with no graphical interface has the same management capabilities as one with a monitor
and mouse.
A veteran AD DS administrator should find their previous knowledge highly relevant. A beginning administrator will find a far
shallower learning curve.

Technical Overview
What You Should Know Before You Begin
This topic assumes familiarity with previous releases of Active Directory Domain Services, and does not provide foundational
detail around their purpose and functionality. For more information about AD DS, see the TechNet Portal pages linked below:
Active Directory Domain Services for Windows Server 2008 R2 (https://technet.microsoft.com/library
/dd378801(ws.10).aspx)
Active Directory Domain Services for Windows Server 2008 (https://technet.microsoft.com/library/dd378891(ws.10).aspx)
Windows Server Technical Reference (https://technet.microsoft.com/library/cc739127(ws.10).aspx)

Functional Descriptions
AD DS Role Installation

Active Directory Domain Services installation uses Server Manager and Windows PowerShell, like all other server roles and
features in Windows Server 2012. The Dcpromo.exe program no longer provides GUI configuration options.
You use a graphical wizard in Server Manager or the ServerManager module for Windows PowerShell in both local and remote
installations. By running multiple instances of those wizards or cmdlets and targeting different servers, you can deploy AD DS to
multiple domain controllers simultaneously, all from one single console. Although these new features are not backwards

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

3 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

compatible with Windows Server 2008 R2 or earlier operating systems, you can also still use the Dism.exe application introduced
in Windows Server 2008 R2 for local role installation from the classic command-line.

AD DS Role Configuration

Active Directory Domain Services configuration " previously known as DCPROMO " is a now a discrete operation from role
installation. After installing the AD DS role, an administrator configures the server as a domain controller using a separate wizard
within Server Manager or using the ADDSDeployment Windows PowerShell module.
AD DS role configuration builds on twelve years of field experience and now configures domain controllers based on the most
recent Microsoft best practices. For example, Domain Name System and Global Catalogs install by default on every domain
controller.
The Server Manager AD DS configuration wizard merges many individual dialogs into fewer prompts and no longer hides
settings in an "advanced" mode. The entire promotion process is in one expanding dialog box during installation. The wizard
and the ADDSDeployment Windows PowerShell module show you notable changes and security concerns, with links to further
information.

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

4 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The Dcpromo.exe remains in Windows Server 2012 for command-line unattended installations only, and no longer runs the
graphical installation wizard. It is highly recommended that you discontinue use of Dcpromo.exe for unattended installs and
replace it with the ADDSDeployment module, as the now-deprecated executable will not be included in the next version of
Windows.
These new features are not backwards compatible to Windows Server 2008 R2 or older operating systems.

Prerequisite Checking
Domain controller configuration also implements a prerequisite checking phase that evaluates the forest and domain prior to
continuing with domain controller promotion. This includes FSMO role availability, user privileges, extended schema
compatibility and other requirements. This new design alleviates issues where domain controller promotion starts and then halts
midway with a fatal configuration error. This lessens the chance of orphaned domain controller metadata in the forest or a server
that incorrectly believes it is a domain controller.

Deploying a Forest with Server Manager


This section explains how to install the first domain controller in a forest root domain using Server Manager on a graphical
Windows Server 2012 computer.

Server Manager AD DS Role Installation Process


The diagram below illustrates the Active Directory Domain Services role installation process, beginning with you running
ServerManager.exe and ending right before the promotion of the domain controller.

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

5 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

Server Pool and Add Roles


Any Windows Server 2012 computers accessible from the computer running Server Manager are eligible for pooling. Once
pooled, you select those servers for remote installation of AD DS or any other configuration options possible within Server
Manager.
To add servers, choose one of the following:
Click Add Other Servers to Manage on the dashboard welcome tile
Click the Manage menu and select Add Servers
Right-click All Servers and choose Add Servers
This brings up the Add Servers dialog:

This gives you three ways to add servers to the pool for use or grouping:
Active Directory search (uses LDAP, requires that the computers belong to a domain, allows operating system filtering and
supports wildcards)
DNS search (uses DNS alias or IP address via ARP or NetBIOS broadcast or WINS lookup, does not allow operating system
filtering or support wildcards)
Import (uses a text file list of servers separated by CR/LF)

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

6 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

Click Find Now to return a list of servers from that same Active Directory domain that the computer is joined to, Click one or
more server names from the list of servers. Click the right arrow to add the servers to the Selected list. Use the Add Servers
dialog to add selected servers to dashboard role groups. Or Click Manage, and then click Create Server Group, or click Create
Server Group on the dashboard Welcome to Server Manager tile to create custom server groups.

You can install roles remotely on any Windows Server 2012 computers added the pool, as shown:

You cannot fully manage servers running operating systems older than Windows Server 2012. The Add Roles and Features
selection is running ServerManager Windows PowerShell Module Install-WindowsFeature.

You can also use the Server Manager Dashboard on an existing domain controller to select remote server AD DS installation with
the role already preselected by right clicking the AD DS dashboard tile and selecting Add AD DS to Another Server. This is
invoking Install-WindowsFeature AD-Domain-Services.

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

7 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The computer you are running Server Manager on pools itself automatically. To install the AD DS role here, simply click the
Manage menu and click Add Roles and Features.

Installation Type

The Installation Type dialog provides an option that does not support Active Directory Domain Services: the Remote Desktop
Services scenario based-installation. That option only allows Remote Desktop Service in a multi-server distributed workload. If
you select it, AD DS cannot install.
Always leave the default selection in place when installing AD DS: Role-based or Feature-based Installation.

Server Selection

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

8 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The Server Selection dialog enables you to choose from one of the servers previously added to the pool, as long as it is
accessible. The local server running Server Manager is automatically available.
In addition, you can select offline Hyper-V VHD files with the Windows Server 2012 operating system and Server Manager adds
the role to them directly through component servicing. This allows you to provision virtual servers with the necessary
components before further configuring them.

Server Roles and Features

Select the Active Directory Domain Services role if you intend to promote a domain controller. All Active Directory
administration features and required services install automatically, even if they are ostensibly part of another role or do not

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

9 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

appear selected in the Server Manager interface.


Server Manager also presents an informational dialog that shows which management features this role implicitly installs; this is
equivalent to the -IncludeManagementTools argument.

Additional Features can be added here as desired.

Active Directory Domain Services

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

10 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The Active Directory Domain Services dialog provides limited information on requirements and best practices. It mainly acts as
a confirmation that you chose the AD DS role " if this screen does not appear, you did not select AD DS.

Confirmation

The Confirmation dialog is the final checkpoint before role installation starts. It offers an option to restart the computer as
needed after role installation, but AD DS installation does not require a reboot.
By clicking Install, you confirm you are ready to begin role installation. You cannot cancel a role installation once it begins.

Results

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

11 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The Results dialog shows the current installation progress and current installation status. Role installation continues regardless
of whether Server Manager is closed.
Verifying the installation results is still a best practice. If you close the Results dialog before installation completes, you can
check the results using the Server Manager notification flag. Server Manager also shows a warning message for any servers that
have installed the AD DS role but not been further configured as domain controllers.
Task Notifications

AD DS Details

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

12 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

Task Details

Promote to Domain Controller

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

13 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

At the end of the AD DS role installation, you can continue with configuration by using the Promote this server to a domain
controller link. This is required to make the server a domain controller, but is not necessary to run the configuration wizard
immediately. For example, you may only want to provision servers with the AD DS binaries before sending them to another
branch office for later configuration. By adding the AD DS role before shipping, you save time when it reaches its destination.
You also follow the best practice of not keeping a domain controller offline for days or weeks. Finally, this enables you to update
components before domain controller promotion, saving you at least one subsequent reboot.
Selecting this link later invokes the ADDSDeployment cmdlets: install-addsforest, install-addsdomain, or installaddsdomaincontroller.

Uninstalling/Disabling
You remove the AD DS role like any other role, regardless of whether you promoted the server to a domain controller. However,
removing the AD DS role requires a restart on completion.
Active Directory Domain Services role removal is different from installation, in that it requires domain controller demotion before
it can complete. This is necessary to prevent a domain controller from having its role binaries uninstalled without proper
metadata cleanup in the forest. For more information, see Demoting Domain Controllers and Domains (Level 200) (demotingdomain-controllers-and-domains--level-200-).

Create an AD DS Forest Root Domain with Server Manager

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

14 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The following diagram illustrates the Active Directory Domain Services configuration process, in the case where you have
previously installed the AD DS role and started the Active Directory Domain Services Configuration Wizard using Server
Manager.

Deployment Configuration

Server Manager begins every domain controller promotion with the Deployment Configuration page. The remaining options
and required fields change on this page and subsequent pages, depending on which deployment operation you select.
To create a new Active Directory forest, click Add a new forest. You must provide a valid root domain name; the name cannot be
single-labeled (for example, the name must be contoso.com or similar and not just contoso) and must use allowed DNS domain
naming requirements.
For more information on valid domain names, see KB article Naming conventions in Active Directory for computers, domains,
sites, and OUs (http://support.microsoft.com/kb/909264).

A new forest does not need new credentials for the domain's Administrator account. The domain controller promotion process
uses the credentials of the built-in Administrator account from the first domain controller used to create the forest root. There is
no way (by default) to disable or lock out the built-in Administrator account and it may be the only entry point into a forest if the
other administrative domain accounts are unusable. It is critical to know the password before deploying a new forest.

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

DomainName requires a valid fully qualified domain DNS name and is required.

Domain Controller Options

The Domain Controller Options enables you to configure the forest functional level and domain functional level for the new
forest root domain. By default, these settings are Windows Server 2012 in a new forest root domain. The Windows Server 2012
forest functional level does not provide any new functionality over the Windows Server 2008 R2 forest functional level. The
Windows Server 2012 domain functional level is required only in order to implement the new Kerberos settings "always provide
claims" and "Fail unarmored authentication requests." A primary use for functional levels in Windows Server 2012 is to restrict
participation in the domain to domain controllers that meet minimum-allowed operating system requirements. In other words,
you can specify Windows Server 2012 domain functional level only domain controllers that run Windows Server 2012 can host
the domain. Windows Server 2012 implements a new domain controller flag called DS_WIN8_REQUIRED in the DSGetDcName
function of NetLogon that exclusively locates Windows Server 2012 domain controllers. This allows you the flexibility of a more
homogeneous or heterogeneous forest in terms of which operating systems are permitted to be run on domain controllers.
For more information about domain controller Location, review Directory Service Functions (https://msdn.microsoft.com/library
/ms675900(vs.85).aspx).
The only configurable domain controller capability is the DNS server option. Microsoft recommends that all domain controllers
provide DNS services for high availability in distributed environments, which is why this option is selected by default when
installing a domain controller in any mode or domain. The Global Catalog and read only domain controller options are
unavailable when creating a new forest root domain; the first domain controller must be a GC, and cannot be a read only
domain controller (RODC).
The specified Directory Services Restore Mode Password must adhere to the password policy applied to the server, which by
default does not require a strong password; only a non-blank one. Always choose a strong, complex password or preferably, a
passphrase.

15 of 29

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

16 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

DNS Options and DNS Delegation Credentials

The DNS Options page enables you to configure DNS delegation and provide alternate DNS administrative credentials.
You cannot configure DNS options or delegation in the Active Directory Domain Services Configuration Wizard when installing a
new Active Directory Forest Root Domain where you selected the DNS server on the Domain Controller Options page. The
Create DNS delegation option is available when creating a new forest root DNS zone in an existing DNS server infrastructure.
This option enables you to provide alternate DNS administrative credentials that have the rights to update DNS zone.
For more information about whether you need to create a DNS delegation, see Understanding Zone Delegation
(https://technet.microsoft.com/library/cc771640.aspx).

Additional Options

The Additional Options page shows the NetBIOS name of the domain and enables you to override it. By default, the NetBIOS
domain name matches the left-most label of the fully qualified domain name provided on the Deployment Configuration
page. For example, if you provided the fully qualified domain name of corp.contoso.com, the default NetBIOS domain name is
CORP.
If the name is 15 characters or less and does not conflict with another NetBIOS name, it is unaltered. If it does conflict with

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

17 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

another NetBIOS name, a number is appended to the name. If the name is more than 15 characters, the wizard provides a
unique, truncated suggestion. In either case, the wizard first validates the name is not already in use via a WINS lookup and
NetBIOS broadcast.
For more information on valid domain names, see KB article Naming conventions in Active Directory for computers, domains,
sites, and OUs (http://support.microsoft.com/kb/909264).

Paths

The Paths page enables you to override the default folder locations of the AD DS database, the database transaction logs, and
the SYSVOL share. The default locations are always in subdirectories of %systemroot% (i.e. C:\Windows).

Review Options and View Script

The Review Options page enables you to validate your settings and ensure they meet your requirements before you start the
installation. This is not the last opportunity to stop the installation when using Server Manager. This is simply an option to
confirm your settings before continuing the configuration

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

18 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The Review Options page in Server Manager also offers an optional View Script button to create a Unicode text file that
contains the current ADDSDeployment configuration as a single Windows PowerShell script. This enables you to use the Server
Manager graphical interface as a Windows PowerShell deployment studio. Use the Active Directory Domain Services
Configuration Wizard to configure options, export the configuration, and then cancel the wizard. This process creates a valid and
syntactically correct sample for further modification or direct use. For example:

#
# Windows PowerShell Script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDNSDelegation `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "Win2012" `
-DomainName "corp.contoso.com" `
-DomainNetBIOSName "CORP" `
-ForestMode "Win2012" `
-InstallDNS:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SYSVOLPath "C:\Windows\SYSVOL"
-Force:$true

Prerequisites Check

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

19 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The Prerequisites Check is a new feature in AD DS domain configuration. This new phase validates that the server configuration
is capable of supporting a new AD DS forest.
When installing a new forest root domain, the Server Manager Active Directory Domain Services Configuration Wizard invokes a
series of modular tests. These tests alert you with suggested repair options. You can run the tests as many times as required. The
domain controller process cannot continue until all prerequisite tests pass.
The Prerequisites Check also surfaces relevant information such as security changes that affect older operating systems.
For more information on the specific prerequisite checks, see Prerequisite Checking (../manage/ad-ds-simplifiedadministration#BKMK_PrereuisiteChecking).

Installation

When the Installation page displays, the domain controller configuration begins and cannot be halted or canceled. Detailed
operations display on this page and are written to logs:
%systemroot%\debug\dcpromo.log
%systemroot%\debug\dcpromoui.log

Results

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

20 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The Results page shows the success or failure of the promotion and any important administrative information. The domain
controller will automatically reboot after 10 seconds.

Deploying a Forest with Windows PowerShell


This section explains how to install the first domain controller in a forest root domain using Windows PowerShell on a Core
Windows Server 2012 computer.

Windows PowerShell AD DS Role Installation Process


By implementing a few straightforward ServerManager deployment cmdlets into your deployment processes, you further realize
the vision of AD DS simplified administration.
The next figure illustrates the Active Directory Domain Services role installation process, beginning with you running
PowerShell.exe and ending right before the promotion of the domain controller.

ServerManager Cmdlet

Arguments (Bold arguments are required. Italicized arguments can be specified by using
Windows PowerShell or the AD DS Configuration Wizard.)

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

21 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

-Name
-Restart
-IncludeAllSubFeature
-IncludeManagementTools

Install-WindowsFeature/AddWindowsFeature

-Source
-ComputerName
-Credential
-LogPath
-Vhd
-ConfigurationFilePath

The ServerManager module exposes role installation, status, and removal portions of the new DISM module for Windows
PowerShell. This layering simplifies the most tasks and reduces need for direct usage of the powerful (but dangerous when
misused) DISM module.
Use Get-Command to export the aliases and cmdlets in ServerManager.

Get-Command -module ServerManager

For example:

To add the Active Directory Domain Services role, simply run the Install-WindowsFeature with the AD DS role name as an
argument. Like Server Manager, all required services implicit to the AD DS role install automatically.

Install-WindowsFeature -name AD-Domain-Services

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

22 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

If you also want the AD DS management tools installed - and this is highly recommended - then provide the
-IncludeManagementTools argument:

Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools

For example:

To list all features and roles with their installation status, use Get-WindowsFeature without arguments. Specify
-ComputerName argument for the installation status from a remote server.

Get-WindowsFeature

Because Get-WindowsFeature does not have a filtering mechanism, you must use Where-Object with a pipeline to find specific
features. The pipeline is a channel used between multiple cmdlets to pass data and the Where-Object cmdlet acts as a filter. The
built-in $_ variable acts as the current object passing through the pipeline with any properties it may contain.

Get-WindowsFeature | where-object <options>

For example, to find all features containing "Active Dir" in their Display Name property, use:

Get-WindowsFeature | where displayname -like "*active dir*"

Further examples illustrated below:

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

23 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

For more information about more Windows PowerShell operations with pipelines and Where-Object, see Piping and the Pipeline
in Windows PowerShell (https://technet.microsoft.com/library/ee176927.aspx).
Note also that Windows PowerShell 3.0 significantly simplified the command-line arguments needed in this pipeline operation.
Windows PowerShell 2.0 would have required:

Get-WindowsFeature | where {$_.displayname - like "*active dir*"}

By using the Windows PowerShell pipeline, you can create readable results. For example:

Install-WindowsFeature | Format-List
Install-WindowsFeature | select-object | Format-List

Note how using the Select-Object cmdlet with the -expandproperty argument returns interesting data:

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

24 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

Create an AD DS Forest Root Domain with Windows PowerShell


To install a new Active Directory forest using the ADDSDeployment module, use the following cmdlet:

Install-addsforest

The Install-AddsForest cmdlet only has two phases (prerequisite checking and installation). The two figures below show the
installation phase with the minimum required argument of -domainname.

ADDSDeployment
Cmdlet

Arguments (Bold arguments are required. Italicized arguments can be specified by using Windows
PowerShell or the AD DS Configuration Wizard.)

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

25 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

-Confirm
-CreateDNSDelegation
-DatabasePath
-DomainMode
-DomainName
-DomainNetBIOSName
-DNSDelegationCredential
-ForestMode
-Force
Install-Addsforest
-InstallDNS
-LogPath
-NoDnsOnNetwork
-NoRebootOnCompletion
-SafeModeAdministratorPassword
-SkipAutoConfigureDNS
-SkipPreChecks
-SYSVOLPath
-Whatif

The equivalent Server Manager Deployment Configuration ADDSDeployment cmdlet and arguments are:

Install-ADDSForest
-DomainName <string>

The equivalent Server Manager Domain Controller Options ADDSDeployment cmdlet arguments are:

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

26 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

-ForestMode <{Win2003 | Win2008 | Win2008R2 | Win2012 | Default}>


-DomainMode <{Win2003 | Win2008 | Win2008R2 | Win2012 | Default}>
-InstallDNS <{$false | $true}>
-SafeModeAdministratorPassword <secure string>

The Install-ADDSForest arguments follow the same defaults as Server Manager if not specified.
The SafeModeAdministratorPassword argument's operation is special:
If not specified as an argument, the cmdlet prompts you to enter and confirm a masked password. This is the preferred
usage when running the cmdlet interactively.
For example, to create a new forest named corp.contoso.com and be prompted to enter and confirm a masked password:

Install-ADDSForest "DomainName corp.contoso.com

If specified with a value, the value must be a secure string. This is not the preferred usage when running the cmdlet
interactively.
For example, you can manually prompt for a password by using the Read-Host cmdlet to prompt the user for a secure string:

-safemodeadministratorpassword (read-host -prompt "Password:" -assecurestring)

You can also provide a secure string as a converted clear-text variable, although this is highly discouraged.

-safemodeadministratorpassword (convertto-securestring "Password1" -asplaintext -force)

Finally, you could store the obfuscated password in a file, and then reuse it later, without the clear text password ever appearing.
For example:

$file = "c:\pw.txt"
$pw = read-host -prompt "Password:" -assecurestring
$pw | ConvertFrom-SecureString | Set-Content $file
-safemodeadministratorpassword (Get-Content $File | ConvertTo-SecureString)

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

27 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

The ADDSDeployment cmdlet offers an additional option to skip automatic configuration of DNS client settings, forwarders, and
root hints. You cannot skip this configuration option when using Server Manager. This argument matters only if you installed the
DNS Server role prior to configuring the domain controller:

-SkipAutoConfigureDNS

The DomainNetBIOSName operation is also special:


If the DomainNetBIOSName argument is not specified with a NetBIOS domain name and the single-label prefix domain
name in the DomainName argument is 15 characters or fewer, then promotion continues with an automatically generated
name.
If the DomainNetBIOSName argument is not specified with a NetBIOS domain name and the single-label prefix domain
name in the DomainName argument is 16 characters or more, then promotion fails.
If the DomainNetBIOSName argument is specified with a NetBIOS domain name of 15 characters or fewer, then
promotion continues with that specified name.
If the DomainNetBIOSName argument is specified with a NetBIOS domain name of 16 characters or more, then
promotion fails.
The equivalent Server Manager Additional Options ADDSDeployment cmdlet argument is:

-domainnetbiosname <string>

The equivalent Server Manager Paths ADDSDeployment cmdlet arguments are:

-databasepath <string>
-logpath <string>
-sysvolpath <string>

Use the optional Whatif argument with the Install-ADDSForest cmdlet to review configuration information. This enables you to
see the explicit and implicit values of a cmdlet's arguments.
For example:

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

28 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

You cannot bypass the Prerequisite Check when using Server Manager, but you can skip the process when using the AD DS
Deployment cmdlet using the following argument:

-skipprechecks

Note how, just like Server Manager, Install-ADDSForest reminds you that promotion will reboot the server automatically.

9/17/2016 8:50 PM

Install a New Windows Server 2012 Active Directory Forest (Level 200)

29 of 29

https://technet.microsoft.com/en-us/windows-server-docs/identity/ad-ds/d...

To accept the reboot prompt automatically, use the -force or -confirm:$false arguments with any ADDSDeployment Windows
PowerShell cmdlet. To prevent the server from automatically rebooting at the end of promotion, use the
-norebootoncompletion argument.

See Also
Active Directory Domain Services (TechNet Portal) (https://technet.microsoft.com/library/cc770946(ws.10).aspx)
Active Directory Domain Services for Windows Server 2008 R2 (https://technet.microsoft.com/library/dd378801(ws.10).aspx)
Active Directory Domain Services for Windows Server 2008 (https://technet.microsoft.com/library/dd378891(ws.10).aspx)
Windows Server Technical Reference (Windows Server 2003) (https://technet.microsoft.com/library/cc739127(ws.10).aspx)
Active Directory Administrative Center: Getting Started (Windows Server 2008 R2) (https://technet.microsoft.com/library
/dd560651(ws.10).aspx)
Active Directory Administration with Windows PowerShell (Windows Server 2008 R2) (https://technet.microsoft.com/library
/dd378937(ws.10).aspx)
Ask the Directory Services Team (Official Microsoft Commercial Technical Support Blog) (http://blogs.technet.com/b/askds)
2016 Microsoft

9/17/2016 8:50 PM

You might also like