Saturday, June 15, 2013

Rename a domain controller

To rename a domain controller, we can use "netdom" to complete it.

Prerequisites
  • Make sure the domain functional level is Windows Server 2003 or later
In my lab environment, there is 2 domain controllers named DC01 and DC02. I would like to rename DC02 to HKGDC02. 2 domain controllers were installed Windows Server 2012 with Active Directory Domain Services and the domain name is abc.local. The forest functional level and domain functional level is Windows Server 2003.

1. On DC02, log in as Domain Administrator.
2. Launch "Command Prompt" as administrator.
3. Perform "netdom computername DC02.abc.local /add:HKGDC02.abc.local".



This command added the additional DNS Host Name and update service principal name (SPN) attributes in Active Directory for this computer account.



Remark: Make sure all domain controllers of this domain received this update from Active Directory replication.

4. Perform "netdom computername DC02.abc.local /makeprimary:HKGDC02.abc.local".



5. Restart DC02.
6. On HKGDC02, log in as Domain Administrator.
7. Launch "DNS Manager".
8. Make sure all DNS resource records of HKGDC02 have been updated.



9. Launch "Command Prompt" as administrator.
10. Perform "netdom computername HKGDC02.abc.local /remove:DC02.abc.local" to remove the old computer name of HKGDC02.



11. Launch "Active Directory Users and Computers".
12. On the menu, click "View > Advanced Features".



13. Expand "abc.local > System > File Replication Service > Domain System Volume (SYSVOL share) > DC02".
14. Right-click "DC02", select "Rename".



15. Enter "HKGDC02".



16. Launch "ADSI Edit" by performing "adsiedit.msc" in Command Prompt.
17. Right-click "ADSI Edit", select "Connect to".



18. Make sure "Default naming context" is selected.



19. Click "OK".
20. Expand "Default naming context > DC=abc,DC=local > OU=Domain Controllers > CN=HKGDC02 > CN=NTFRS Subscription".
21. On right pane, right-click "CN=Domain System Volume (SYSVOL share)", select "Properties".



22. Make sure the name of "fRSMemberReference" was changed to new name.



23. Click "OK".

If the domain is used DFS replication for SYSVOL, we can navigate to abc.local > System > DFSR-GlobalSettings > Domain System Volume > Topology > DC02" in Active Directory Users and Computers to rename the domain controller.



To verify the setting, launch "ADSI Edit" and then navigate to "Default naming context > DC=abc,DC=local > OU=Domain Controllers > CN=HKGDC02 > CN=DFSR-LocalSettings".

Right-click "CN=Domain System Volume", select "Properties".


Make sure the name of "msDFSR-MemberReference" was changed to new name.

Remark: After renamed the domain controller, you may need to delete the old resource records in the DNS server by yourself.



References:
Rename a domain controller

Update the FRS or DFS Replication Member Object

This posting is provided “AS IS” with no warranties, and confers no rights!

3 comments:

  1. When attempting to add the alternate name, I get the following error:

    Unable to add filesvr.domain.local
    as an alternate name for the computer.
    The error is:

    The requested resource is in use.

    The command failed to complete successfully.

    Anyone have an idea of how to fix this?

    ReplyDelete
    Replies
    1. How many domain controllers are there in your environment?

      Is this name used on other servers?

      Have you performed "enum" or "verify" parameter of netdom computername to check the status?

      Delete