Danny Moran

Promote Additional Active Directory Domain Controller Using Powershell (Microsoft Windows Server 2022 Core)

Published February 12, 2022 by Danny Moran

Table of Contents
PAGE CONTENT

Introduction

Learn how to promote a new secondary domain controller to an existing active directory domain using PowerShell. In this example, I go through the process of using Powershell to install the Active Directory Domain Services (ADDS) and Domain Name Services (DNS) roles and features, promoting a new Domain Controller to an existing Active Directory domain, and setting the server as an additional local network DNS server.

Promote Additional Active Directory Domain Controller and DNS Installation Guide on Microsoft Windows Server 2022

Commands used in this guide

Install Active Directory Domain Services role

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

Check Active Directory Domain Services role installed

Get-Command -Module ADDSDeployment

Promote server to a Domain Controller

Import-Module ADDSDeployment
Install-ADDSDomainController `
-NoGlobalCatalog:$false `
-CreateDnsDelegation:$false `
-Credential (Get-Credential) `
-CriticalReplicationOnly:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainName "ad.dannymoran.com" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SiteName "Default-First-Site-Name" `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

List of all other switches for Install-ADDSDomainController

Microsoft Docs page for a list of all configuration options that can be set for Install-ADDSDomainController