How to install Active Directory using the dcpromo command

To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!

Hello,

Second of four articles presenting different methods for installing Active Directory:
Installing Microsoft Active Directory via the graphical interface (server 2012, 2012r2, 2016, 2019, 2022)
- Install Microsoft Active Directory via the dcpromo  command(server 2003, 2008, 2008r2, 2012, 2012r2, 2016, 2019, 2022)
- Install Microsoft Active Directory via Powershell (server 2012, 2012r2, 2016, 2019, 2022)
- Installing Microsoft Active Directory via Powershell DSC (server 2016, 2019, 2022)

dcpromo is the historical command for configuring a domain controller.
It can only be used with a response file since Windows server 2012.
The dcpromo command is available once the active directory domain service role has been installed.

dcpromo and response file

# Creating a response file named Unattend.txt in Powershell:
New-item unattend.txt -itemtype file
# Specify the following values in the file:
[DCINSTALL]
ReplicaOrNewDomain=Domain
NewDomain=Forest
NewDomainDNSName=domain.tld
DomainNetbiosName=domain
; 2 = 2003, 3 = 2008, 4 = 2008R2, 5 = Win2012, 6 = 2012R2, 7 = 2016
ForestLevel=7
DomainLevel=7
InstallDNS=Yes
ConfirmGc=Yes
CreateDNSDelegation=No
DatabasePath="C:\WindowsNTDS"
LogPath="C:\WindowsNTDS"
SYSVOLPath="C:\Windows\SYSVOL"
SafeModeAdminPassword=P@ssword
RebootOnCompletion=Yes
#Run the dcpromo command:
dcpromo /unattend:unattend.txt

Note : The password contained in the unattend.txt file is deleted once it has been used by the dcpromo command.

The server manager should display a warning telling you to promote the server to domain controller.
Run the wizard and close the wizard directly to stop being warned.
This problem also exists if you are doing an AD installation via MDT (Microsoft Deployment Toolkit).

Video : How to install Active Directory using the dcpromo command

Related links