9/12/2009

Caution when renaming W2k8 Domain Controller

I recently had a problem when renaming a W2K8 Domain Controller.

1. Promoted a W2K8 Server as additional Domain Controller named "DCTempName"
2. Demoted a W2k3 Domain Controller named "DC1" and joined it as "DC1OLD" as default Domain member
3. Renamed the new W2K8 DC "DCTempName" to "DC1"
4. Got an error saying that the object already exists
---> OK i thought i can't rename it, assuming the old DC forces the probem.
5. But locally the W2k8 DC was renamed ("DC1") and it the OU Domain Controller and in DNS Site _msdcs_ it still was listed with the old name ("DCTempName")
6. Tried renaming it or demoting it -> No chance

Solution:
1. dcpromo /forceremoval
2. Renamed the Computer to "DCTempName"
2. Promoted it as Domain Controller with the name "DCTempName"
3. Waiting for replication (repadmin /showrepl)
4. Demoted the DC -> OK now AD was clear
5. Promoted it with the name "DC1"

I assume the problem occured because of the old DC object which was still domain member with the same SID...So be very carefully.
Another solution is an Active Directory metadata cleanup http://support.microsoft.com/kb/216498/en-us