Adding a Server 2012 Core as domain controller to an existing domain

Added a Server 2012 Core machine as DC to my existing (virtual) domain today. Did it using PowerShell.

First up, add the AD-Domain-Services (and DNS if you plan on using that) features:

Curious about what the Active Directory related cmdlets are? This will help:

Three commands are to do with installing domain controllers:

  1. The Install-ADDSDomain cmdlet installs a new Active Directory domain configuration.
  2. The Install-ADDSForest cmdlet installs a new Active Directory forest configuration.
  3. The Install-ADDSDomainController cmdlet installs a domain controller in Active Directory.

In my case the Install-ADDSDomainController cmdlet is what’s of interest.

This cmdlet has many switches, some of the regularly used ones are:

  • -Credential to specify the credentials of the account used to install the DC. Use -Credential (Get-Credential) to be prompted for the password;
  • -DatabasePath (default: %SYSTEMROOT%NTDS) and -LogPath (default: %SYSTEMROOT%NTDS) and -SysvolPath (default: %SYSTEMROOT%SYSVOL) to specify the location where you want the database and log files and SYSVOL to be (%SYSTEMROOT is C:Windows usually);
  • -DomainName to specify the name of the domain; and
  • optionally -SiteName to specify a site name and -SafeModeAdministratorPassword to specify a safe mode administrator password (use this switch if you’d like to specify a password; if you skip you are prompted for a password anyways)

So it’s kind of straight-forward what we need to do:

Once the cmdlet completes it reboots the server, after which I manually created a DNS delegation to this domain controller for the domain (since I am installing a DNS server too).