How to use DCPromo to Promote AD Domain Controllers

On Windows Server, the DCPROMO console program is used to deploy the ADDS (Active Directory Domain Services) role, promote or demote a member server to the AD domain controller.

dcpromo /unattend[:filename] /adv /uninstallBinaries /CreateDCAccount /UseExistingAccount:Attach [:{Promotion | CreateDcAccount | UseExistingAccount | Demotion}] /?:Promotion, /?:CreateDCAccount, /?:UseExistingAccount, and /?:Demotion

Dcpromo Command Line Arguments:

The dcpromo utility can be used to install the first DC on a non-domain joined Windows Server without needing to be present. Create a new text file named c:dcpromo unattend.txt and fill it with the following information.

DomainNetbiosName= solutionviews

To promote the present server to the first domain controller in a new domain forest, open an elevated command prompt and type the following command.

dcpromo.exe /unattend:C:\dcpromo_unattend.txt

You’ll have a fully functional domain controller with the ADDS role installed after the script completes.
You can demote the domain controller to the member server using the dcpromo /forceremoval command. If one of the FSMO roles is discovered on the domain controller, you will be prompted to move it to a different DC first. A warning will show if this server is a Global catalogue.
In Windows Server 2000, 2003, 2008, and 2008 R2, the Dcpromo command was used to promote member servers to domain controllers. However, starting with Windows Server 2012 and newer, the Dcpromo command has been deprecated. A warning will display when you try to perform the dcpromo command on Windows Server 2012 R2:
In Server Manager, the Active Directory Services installation wizard has been relocated.

Thus, in Windows Server 2012 R2, 2016, and 2019, you can promote a Windows Server to a domain controller using the Server Manager or ADDSDeployment PowerShell module (which actually runs in the wizard “Promote this server to a domain controller” during the installation of the ADDS role when you specify the settings for the new DC when you specify the settings for the new DC).

You may use the following PowerShell script to install the new DC using the ADDSDeployment module:

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools

Import-Module ADDSDeployment
Install-ADDSDomainController -NoGlobalCatalog:$false
-CreateDnsDelegation:$false -CriticalReplicationOnly:$false
-DatabasePath “C:\Windows\NTDS” -DomainName “”
-InstallDns:$true -LogPath “C:\Windows\NTDS”
-NoRebootOnCompletion:$false -SiteName “Default-First-Site-Name”
-SysvolPath “C:\Windows\SYSVOL” `

The dcpromo /unattend command, on the other hand, can be used in various scripts to configure a new DC on Windows Server Core automatically (it contains no GUI).

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha Here :