In some cases in the real sysadmin world you have to rename an AD Server Hostname. In this post I’ll show all steps involved in this process.
Att.: Domain Controllers configured as a Certificate Authority (CA) cannot be renamed.
Check Active Directory domain and forest functional levels
The domain and forest functional levels must be at least Windows 2003 to change the domanin controller name.
a) Open Active Directory User & Computers
b) Right-click the root domain, then select Raise Domain Functional Level
c) Select Windows 2003 and confirm
d) Open Active Directory Domains and Trusts
e) Right-click the root domain, then select Raise Forest Functional Level
f) Select Windows 2003 and confirm
g) Check System logs: all works fine after this change ??
Change the name !
netdom computername <Current FQDN Computername> /add:<New FQDN Computername>
Example
netdom computername adc1.gptucci.local /add:adc2.gptucci.local
Wait some minutes and check the DNS to see if the new computer name appear: only after that you can go further.
netdom computername <CurrentComputerName >/makeprimary:<New ComputerName>
Final Step
a) Restart the computer
b) Check system log: if all seem fine you can go further.
c) Submit the next command.
netdom computername <New FQDN Computername> /remove:<Old FQDN Computername>
d) In DNS delete any reference to the old Computername.
Last but not least…….
Check that your Domain Server running without any issue. On CMD run the next command.
dcdiag
That’s all.