Jul 142008
 


We can rename a computer from command-line on Windows Server 2008, Windows Server 2003 and Windows XP in a domain environment with Active Directory. In Windows XP, we need to install the Windows XP support tools and in Windows Server 2003, we need Administrators pack installed.

To download the support tools for Windows XP SP2, click here

To download the Administrator pack for Windows Server 2003, click here 

To rename a computer attached to a Domain:

C:\Users\Administrator> netdom renamecomputer SAI /newname:SAIBABA /userD:hq\Administrator Passwordd:**** /usero:hq\Administrator /passwordo:***** /reboot

This renames the computer and reboots for the changes to take effect.

The syntax is

netdom renamecomputer <CurrentName> /newname:<NewName> /userD:<Domain Admin User> Passwordd:domainpass /usero:<localAdmin> /passwordo:localpass /reboot

In the above, if you enter “*” instead of the password then it will prompt for the respective user password.

The UserD & PasswordD options allows to make connection to the domain controller

The UserO & passworO options allows to make connection to the local host. This could be the same as the Domain Admin.

Incoming search terms:

  5 Responses to “How to Rename a Computer from Command Line in Windows”

  1. Your artical states “We can rename a computer from command-line on Windows Server 2008, Windows Server 2003 and Windows XP in a domain environment with Active Directory.”

    Where’s the info to change the computer name in Win XP?

  2. Sorry, should have mentioned about the Support Tools for Windows XP. I’ve now updated the article accordingly.

  3. Netdom is a crap. It renames only computers in domain and only if domain is available.

    Compname solve my problem.

  4. I had to use a / before passwordd to make it work.
    so it’s [...] /Passwordd:domainpass [...].

    Thanks for this anyway :)

  5. how do you rename a win2k8 server that is a domain controller already? using command-line

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>