Task: rename a domain controller running Windows Server 2003 or 2008.
The simple method - opening the computer's properties and changing the name - doesn't work, because the server will complain with something like "first demote the server's role and only then rename it". In a way it's right - you shouldn't just change the name for no reason. After all, the domain controller is the most important part of the domain, and Windows services refer to it precisely by name, not at all by IP address, as we would sometimes like.
However, situations vary, and sometimes demoting the controller's role just to rename it is not just "not great" - it's simply not possible at all.
Well then, let's get started.
1) First - if the certificate services role is installed on the server, it will have to be removed, otherwise nothing will work. We have already written about how to do this.
2) If you don't have Server 2008 - you'll need to download the "Windows Server 2003 Administration Tools Pack", available here:http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c16ae515-c8f4-47ef-a1e4-a8dcbacff8e3
3) Next, run the following command from a command prompt with admin rights:
C:\> netdom computername OldComputerName /add:NewComputerName
This will add another network name for this computer (in our case, the server). Moreover, this name will also be registered in the domain's DNS.
4) Wait until all domain controllers complete replication. This is very important - none of the controllers should be unaware of the current state of the domain.
5) Now let's make the new server name the primary one:
C:\> netdom computername OldComputerName /makeprimary:NewComputerName
6) Reboot the server
7) Enter at the command prompt:
C:\> netdom computername NewComputerName /remove:OldComputerName
with this we remove the old computer (server) name.
That's it, the domain controller has been renamed.
In the examples above:
- NewComputerName: the new name of the domain controller server
- OldComputerName: the old name of the domain controller server
Applies to: Windows Server 2003, 2008
Comments