Rename one domain controller from start to finish, check it is healthy, then repeat for the next. The DC that holds the roles goes last.
Finish every step on one DC, including the checks, before you start the next. Never restart both together.
Add the new name
Sign in to the DC you are renaming. This gives it the new name alongside the old one.
hostname netdom computername SRV-DC-02.ad.contoso.com /add:CON-DC-02.ad.contoso.com
It should say Successfully added.
Let the new name spread
The other DC and DNS need to learn the new name before you switch to it.
ipconfig /registerdns repadmin /syncall /AdeP | Select-String 'error|terminated' Start-Sleep -Seconds 60
Every line should read SyncAll terminated with no errors.
Make the new name the main one
netdom computername SRV-DC-02.ad.contoso.com /makeprimary:CON-DC-02.ad.contoso.com
It should say Successfully made ... the primary name, and warn that a restart is needed. Stop here if it reports an error.
Restart
Restart-Computer -Force
Sign in again when it is back. If your sign-in is refused in the first minute, wait and try again.
Remove the old name
netdom computername CON-DC-02.ad.contoso.com /remove:SRV-DC-02.ad.contoso.com
Check it is healthy
hostname Get-ADDomainController -Filter * | Format-Table Name, HostName, IPv4Address -AutoSize Resolve-DnsName CON-DC-02.ad.contoso.com -Type A Get-SmbShare SYSVOL, NETLOGON | Format-Table Name, Path -AutoSize netdom query fsmo repadmin /replsummary
| Check | What you want |
|---|---|
| hostname | The new name. |
| Domain controller list | The new name, with the same address as before. |
| Resolve-DnsName | The DC's address. |
| Shares | Both SYSVOL and NETLOGON listed. |
| Roles | Each role on the DC that held it before. |
| Replication | 0 failures. |
Repeat for the next domain controller
Only when every check passes, sign in to the next DC and run steps 1 to 6 again with its names. In this guide that is SRV-DC-01 becoming CON-DC-01.
Done when
Every domain controller reports its new name, the roles are where they were, and replication shows 0 failures.


