| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| microsoft:server [2024/10/04 09:33] – sysadmin | microsoft:server [2026/02/23 12:25] (current) – rplecko |
|---|
| https://www.dell.com/support/kbdoc/en-us/000226230/windows-server-how-to-properly-rename-an-active-directory-domain-controller | https://www.dell.com/support/kbdoc/en-us/000226230/windows-server-how-to-properly-rename-an-active-directory-domain-controller |
| |
| | hostname |
| | |
| | ...checks current hostnme... |
| |
| 1. At an elevated command prompt, type //netdom computername <oldname> /add:<newname>//. The output should indicate that the new name was successfully added as an alternate name for the DC. | 1. At an elevated command prompt, type //netdom computername <oldname> /add:<newname>//. The output should indicate that the new name was successfully added as an alternate name for the DC. |
| netdom computername DC-Runit.runit-stupnik.local /add:DC-Runit-01.runit-stupnik.local | netdom computername dc2.ad.domain.com /add:newdc2.ad.domain.com |
| {{ :microsoft:server:DC-rename-1.jpeg?700 }} | {{ :microsoft:server:DC-rename-1.jpeg?700 }} |
| Output of the netdom computername oldname /add:newname command | |
| | |
| 2. To confirm that the new name was added, type netdom computername <oldname> /enumerate. Both names should be listed in the output. | 2. To confirm that the new name was added, type netdom computername <oldname> /enumerate. Both names should be listed in the output. |
| Output of the netdom computername oldname /enumerate command | netdom computername dc2.ad.domain.com /enumerate |
| | {{ :microsoft:server:DC-rename-2.jpeg?700 }} |
| | |
| 3. Type netdom computername <oldname> /makeprimary:<newname> to set the new FQDN as the DC's primary name. The output should indicate that this was successful. It will also indicate that a reboot is necessary. | 3. Type netdom computername <oldname> /makeprimary:<newname> to set the new FQDN as the DC's primary name. The output should indicate that this was successful. It will also indicate that a reboot is necessary. |
| Output of the netdom computername oldname /makeprimary:newname command | netdom computername dc2.ad.domain.com /makeprimary:newdc2.ad.domain.com |
| | {{ :microsoft:server:DC-rename-3.jpeg?700 }} |
| | |
| 4. Reboot the DC. | 4. Reboot the DC. |
| | |
| | shutdown -r -t 0 |
| | |
| 5. Launch an elevated command prompt and type netdom computername <newname> /remove:<oldname> to remove the old FQDN from the DC's list of names. | 5. Launch an elevated command prompt and type netdom computername <newname> /remove:<oldname> to remove the old FQDN from the DC's list of names. |
| Output of the netdom computername newname /remove:oldname command | netdom computername newdc2.ad.domain.com /remove:dc2.ad.domain.com |
| | {{ :microsoft:server:DC-rename-5.jpeg?700 }} |
| | |
| 6. Confirm that the old name has been removed by typing netdom computername <newname> /enumerate. The new FQDN should be the only name listed in the output. The DC has now been renamed. | 6. Confirm that the old name has been removed by typing netdom computername <newname> /enumerate. The new FQDN should be the only name listed in the output. The DC has now been renamed. |
| Output of the netdom computername newname /enumerate command | netdom computername newdc2.ad.domain.com /enumerate |
| | {{ :microsoft:server:DC-rename-6.jpeg?700 }} |
| | |
| | 7. Reboot the DC. |
| | <code> |
| | shutdown -r -t 0 |
| | </code> |
| | Summary |
| | <code> |
| | hostname |
| | netdom computername <old> /add:<new> |
| | netdom computername <old> /enumerate |
| | netdom computername <old> /makeprimary:<new> |
| | shutdown -r -t 0 |
| | netdom computername <new> /remove: <old> |
| | netdom computername <new> /enumerate |
| | shutdown -r -t 0 |
| | </code> |
| |