Monday, October 20, 2008

Renaming your domain controller hostname

This is not really recommended if you think about it. How many of you eventually decided that one day, you need to rename your domain controller? I bet no one. But there are unusual cases where you do not have any other choice but to do it.

That's what happened to me when I was building my virtual image of a Windows Server 2003 domain controller. I accidentally plugged in my automated installation CD. To my surprise, the installation has generated a random name for my machine. Although I could demote the domain controller, change the hostname, and promote it back, it would be very time consuming with all those reboots and manual steps. Searching thru Google gave me this site which recommends the use of the Netdom.exe tool. You do need to install the Windows Support Tools to use this tool. To change the hostname of the domain controller, open the command prompt associated with the Windows Support Tools. Then, run the following command

netdom computername oldhostname.domainname /add:newhostname.domainname

Although there are other instructions mentioned in the article, I only needed this command. After rebooting the server, I ran dcdiag.exe (Domain Controller Diagnostics Tool) and netdiag.exe(Network Connectivity Test Tool in the Windows Support Tools command prompt to validate the connectivity to the domain controllers. Knowing that you have the right tools available would make life a bit easy for any professional - whether in IT or not

2 comments:

Craig March said...

How many of you eventually decided that one day, you need to rename your domain controller?

We recently needed to rename our domain controllers (and domain!) due to a company name change. I guess it happens fairly regularly.

bassplayer said...

Hi Craig,

I guess with mergers and acquisitions, it has become a regular activity for quite sometime. But of course, as IT professionals, we also need to plan our infrastructure accordingly, though, we are not assuming that one day our company would merge or be bought over by another one.

Thanks for visiting my blog. I hope it is of value to you and your organization.

Google