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.
- In the PowerShell box, run ipconfig /flushdns to remove any cached DNS entries created by the local DNS resolver.
- Run ipconfig /registerdns to ensure the new IP address is registered by the DNS server.
- 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.
- Open an administrative command prompt.
- 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. - Type netdom computername /makeprimary:NewDC01
This command designates the new name as the DC’s primary computer name. - Reboot the server.
- When the server comes back up, open an administrative command prompt.
- 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;
- Open Active Directory Users and Computers.
- From the View menu, select Advanced Features.
- 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. - Right-click the object corresponding to the DC’s old name and select Rename.
- Type the DC’s new name and hit Enter.