How to install Active Directory using the dcpromo command
2 min read · Updated 11 October 2021
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 Services 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=DomainNewDomain=ForestNewDomainDNSName=domain.tldDomainNetbiosName=domain; 2 = 2003, 3 = 2008, 4 = 2008R2, 5 = Win2012, 6 = 2012R2, 7 = 2016ForestLevel=7DomainLevel=7InstallDNS=YesConfirmGc=YesCreateDNSDelegation=NoDatabasePath="C:\WindowsNTDS"LogPath="C:\WindowsNTDS"SYSVOLPath="C:\Windows\SYSVOL"SafeModeAdminPassword=P@sswordRebootOnCompletion=Yes
#Run the dcpromo command:dcpromo /unattend:unattend.txtNote: 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
- Installation
How to install Active Directory via the graphical interface
First of four articles showcasing different methods for installing Active Directory
1 min read
- Installation
How to install Active Directory with PowerShell DSC
How to install Active Directory and create a domain with PowerShell DSC (Desired State Configuration)
3 min read
- Installation
How to install Active Directory using PowerShell
This is the third of four articles presenting different methods of installing Active Directory
1 min read
- Maintenance
Fix an Active Directory sign-on approval relationship error
How to fix a sign-on approval relationship error in Active Directory
2 min read
- Tips
How to create a multiboot USB key with the Ventoy tool
It's useful to have a multiboot USB stick containing operating system images or troubleshooting tools that you can boot from if you need to
1 min read
- Configuration
How to join an Active Directory domain using the netdom command
Join an Active Directory domain with the netdom command
1 min read
New site · Reference
The Windows directory tree
Native Windows folders, files and logs: what they are for, what they contain, with commands and Microsoft sources.
Browse the treeNew site · Reference
Group Policy settings
ADMX settings for Windows 10, 11, Server and applications: registry keys, PowerShell commands and use cases.
Browse the policies