Pre-requirement
- Check and ensure the AD environment is healthy.
- Check all DCs in this domain is working fine by running
Dcdiag /v
on every DC. - Check if AD replication works properly by running
repadmin /showrepl
andrepadmin /replsum
on every DC. 2.Back up all domain controllers if needed.
Promote Secondary Domain Controllers
- Install Windows, patch it to the latest patches.
- Run
sconfig
, configure the computer name, IP Address, DNS and reboot the machine. - Join to the existing domain. Restart
- Install Domain services:
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
- Reboot the server.
- Promote AD:
Install-ADDSDomainController -InstallDns -Credential (Get-Credential DOMAIN\Administrator) -DomainName contoso.com -SafeModeAdministratorPassword (ConvertTo-SecureString -AsPlainText "secret-password" -Force)
If you want to promote it using argument mode, you need to create the argument as the following:
$HashArguments = @{
Credential = (Get-Credential "DOMAIN\Administrator")
DomainName = "contoso.com"
InstallDns = $true
}
Install-ADDSDomainController @HashArguments
Remove Secondary Domain Controller
To uninstall the secondary domain controller:
Uninstall-ADDSDomainController