How To Use the Netdom.exe Utility to Rename a Computer in Windows Server 2003

Article translations Article translations
Article ID: 325354 - View products that this article applies to.
This article was previously published under Q325354
Expand all | Collapse all

On This Page

SUMMARY

This article describes how to use the Netdom.exe utility (included in Windows Server 2003 Support Tools) to rename a computer that is a member of a Microsoft Windows 2000 or Windows Server 2003 domain. This procedure can be performed either locally or remotely on the computer that is being renamed. Also, the procedure does not require that you to reset or manually re-create the computer account in the domain.

The Netdom.exe utility can rename a computer that is a member of a Windows Server 2003 domain. However, to rename the computer, you must specify the user accounts that have local administrative permissions and the object of the computer account in Active Directory.

NOTE: To rename a domain controller by using the netdom command, the domain functional level must be set to Windows Server 2003. However, this command renames a computer that is joined to a domain. The computer object in the domain is also renamed. Certain services, such as the certification authority, rely on a fixed machine name. If any services of this type are running on the target computer, a computer name change has an adverse effect. Because of this, do not use this command to rename a domain controller. Use the netdom computername command instead. Or, for additional help, search the Help files for netdom, and then see the "Rename a domain controller: Active Directory" topic.

How to Rename a Computer

  1. Install Windows Server 2003 Support Tools from the Support\Tools folder on the Windows Server 2003 CD-ROM. (To do this, right-click the Suptools.msi file in the Support\Tools folder, and then click Install.)
  2. At a command prompt, type the following command.NOTE: The following command line has been wrapped to multiple lines to make it easier to read. Enter the command as a single line.
    netdom renamecomputer Computername /newname:new_computername
    /userd:domain\UserName /passwordd:password |* /usero:UserName
    /passwordo:password |* /force /reboot:Time in seconds
    The following is a description of this command line:

    • Computername: The current name of the computer to be renamed.

    • New_computername: The name that the computer will be renamed to. Both the Domain Name System (DNS) host label and the NetBIOS name are changed to the new name. If the new name is longer than 15 characters, the NetBIOS name is derived from the first 15 characters.

    • /userd:Domain\UserName: The user account to be used for the destination domain. This account is used to make the connection with the domain to which the computer is joined. This parameter is required, and if no domain is specified, the computer's domain is assumed.

    • /usero:UserName: A user account to be used for the originating domain that has local administrative permissions (this can be the same account specified for /userd:). This account is used to make the connection with the computer to be renamed. If omitted, the currently logged on user's account is used. The user's domain can be specified as "/uo:domain\user". If the domain is omitted, a local computer account is assumed.

    • /passwordd: password: The password of the user account specified by /userd.

    • /passwordo: password: The password of the user account specified by /usero.

      The asterisk symbol (*): A value that can be connected to either /passwordd or /passwordo and which indicates to prompt for the password.

    • force: This command can adversely affect some services running on the computer. The user will be prompted for confirmation unless the /force switch is specified.

    • Reboot: This specifies that the computer should be shut down and automatically restarted after the rename operation is completed. The number of seconds before automatic shutdown can also be provided. The default is 30 seconds. If this parameter is not specified, the computer must be restarted manually.
For example, assume that you have a workstation named "Mycomputer" that is a member of a domain named "Mydomain." You want to change the workstation name to "Yourcomputer," and then automatically restart the workstation after 60 seconds. You can use the following command.

NOTE: The following command-line syntax has been wrapped to multiple lines to make it easier to read. You must enter the command as a single line.
netdom renamecomputer mycomputer /newname:yourcomputer
/userD:mydomain\administrator /passwordd:*
/usero:administrator /passwordo:* /reboot:60
The following warning message may be displayed and you may be prompted about whether or not you want to continue:
This operation will rename the computer "Mycomputer" to "Yourcomputer". Certain services, such as certification authority, rely on a fixed computer name. If any services of this type are running on "Mycomputer", a computer name change would have an adverse impact.
If you do not want to be prompted to continue, include the /force switch when you enter the netdom command in addition to the other parameters.

Properties

Article ID: 325354 - Last Review: October 30, 2006 - Revision: 5.4
APPLIES TO
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, 64-Bit Datacenter Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
Keywords: 
kbactivedirectory kbhowto kbhowtomaster kbofficexpsp1fix KB325354

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com