Changing IP and Computer Name of a Domain Controller

image_pdfimage_print

Sometimes it is necessary to change the IP address assigned to a domain controller, especially if you want to change the network address or after a Server Migration.

First, you may need to check the DC health by executing the DCDIAG command (always run as Administrator)

Then, you can change the IP address as necessary;

Now the IP address has been changed, we need to empty the local DNS cache and register the DC’s new IP address in DNS.

  1. In the PowerShell box, run ipconfig /flushdns to remove any cached DNS entries created by the local DNS resolver.
  2. Run ipconfig /registerdns to ensure the new IP address is registered by the DNS server.
  3. Run dcdiag /fix to update Service Principal Name (SPN) records and check that all the tests are passed successfully.

If you have a distributed AD DS / DNS infrastructure, you may need to wait for DNS information to replicate or force a replication. If present, sub-net information in AD Sites and Services should be updated if the subnet addressing scheme is also modified.

Changing the Hostname as necessary;

Renaming a DC by using netdom commands is the preferred method. It requires that the domain functional level be at least Windows Server 2003.

  1. Open an administrative command prompt.
  2. Type netdom computername /add:.
    For example, if you are renaming a DC from OldDC01 to NewDC01, you would type netdom computername OldDC01 /add: NewDC01
    This command adds a second entry to the list of computer names used by the DC.
  3. Type netdom computername /makeprimary:.NewDC01
    This command designates the new name as the DC's primary computer name.
  4. Reboot the server.
  5. When the server comes back up, open an administrative command prompt.
  6. Type netdom computername /remove: OldDC01
    This command removes the old name from the list of computer names used by the DC.

To update the FRS or DFS-R member object, perform the following steps;

  1. Open Active Directory Users and Computers.
  2. From the View menu, select Advanced Features.
  3. If SYSVOL is replicated using the File Replication System:
    Expand System > File Replication Service > Domain System Volume (SYSVOL Share).
    If SYSVOL is replicated using Distributed File System Replication (DFS-R):
    Expand System > DFSR-GlobalSettings > Domain System Volume > Topology.
  4. Right-click the object corresponding to the DC's old name and select Rename.
  5. Type the DC's new name and hit Enter.