Rename a Computer using Netdom.exe
It is one of those daily tasks that we don’t think about too much: renaming a computer.
Using the first initial last name method I set a machine name for my XP users. When possible I prefer the window based method as described in KB295017:
- Click Start, right-click My Computer, and then click Properties.
- Click Start, click Run, type sysdm.cpl, and then click OK.
- Click Start, click Control Panel, double-click Performance and Maintenance, and then click System.
And the next step:
- Click the Computer Name tab, and then click Change.
- Type the new computer name in the Computer name dialog box.
- Type the new domain or workgroup in either the Domain dialog box or the Workgroup dialog box.
- Click More to change the primary Domain Name System (DNS) suffix.
- Click OK three times, and then restart the computer.
This is all nice and easy to follow BUT it does not always work.
Today when I tried to rename a PC the following error prompted:
A connection to the server could not be performed because the maximum number of simultaneous connections has been reached.
It is not the first time I’ve seen it and though you would expect it to disappear after you boot the machine, the same error show up every time.
At this point there are two types of administrators: the first type is the warrior who spend hours or days to find the reason, post the problem on every forum and maybe (but not always) find a solution.
I’m the other type, the busy administrator who cannot afford spending so much time on something that can be resolved in few minutes using a different method.
If you never heard of Netdom.exe (and Windows XP Support Tools) it is about time. If you’re familiar with this package and specifically with Netdom.exe, I’m sure a reminder wouldn’t hurt.
This is the syntax used to change a machine name using Netdom.exe
netdom renamecomputer machine /newname:new_computername /userd:domainname\administrator_id /passwordd:* /usero:local_admin
/passwordo:* /reboot:seconds before automatic reboot
You can find the full details either on the KB page or via command line HELP.
After hitting the Enter key you’ll be prompted for one or two passwords, based on the options you choose. Few seconds later the process is completed and after you boot the computer (either using the /reboot option or manually if you didn’t use it) the machine will have a new name in Active Directory.
