Partager via


Netdom renamecomputer

 

Applies To: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows 8

Renames a domain computer and its corresponding domain account. Use this command to rename domain workstations and member servers only. To rename domain controllers, use the netdom computername command.

Netdom is a command-line tool that is built into Windows Server 2008 and Windows Server 2008 R2. It is available if you have the Active Directory Domain Services (AD DS) server role installed. It is also available if you install the Active Directory Domain Services Tools that are part of the Remote Server Administration Tools (RSAT). For more information, see How to Administer Microsoft Windows Client and Server Computers Locally and Remotely (https://go.microsoft.com/fwlink/?LinkID=177813).

To use netdom, you must run the netdom command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

For examples of how to use this command, see Examples.

Syntax

netdom renamecomputer <Computer> /newname:<NewComputerName> /userd:[<Domain>\]<UserName> [/passwordd:[<Password> | *]] /usero:[<Domain>\]<UserName> [/passwordo:[<Password> | *]] [/reboot[:<Delay>]] [{/help | /?}]

Parameters

Parameter

Description

<Computer>

Specifies the name of the computer that you want to rename.

/newname:<NewComputerName>

Specifies the new name of the computer.

/userd:[<domain\]<UserName>

Specifies the user account that you want to use for the destination domain.

/passwordd:[<password> | *]

Specifies the password of the user account that you specify in the /ud or /userd parameter. If you specify the value of this parameter as a wildcard character (*), this parameter prompts you for the password.

/usero:[<domain>\]<UserName>

Specifies the user account that you want to use for the originating domain.

/passwordo:[<password>| *]

Specifies the password of the user account that you specify for the /uo or /usero parameter. If you specify the value of this parameter as a wildcard character (*), this parameter prompts you for the password.

/force[:<Delay>]

The user will be prompted for confirmation unless the /force parameter is specified.

/reboot[:<Delay>]

Specifies to shut down and automatically restart the computer after the rename operation completes. The Delay value is the number of seconds before automatic shutdown occurs. The default Delay value is 20 seconds.

{/help | /?}

Displays help at the command prompt.

Note

Do not use the netdom renamecomputer command to rename AD DS domain controllers. Doing so may cause the domain controller to no longer function as a domain controller on the network. To rename AD DS servers and domain controllers, use netdom computername.

Examples

To rename the member server member to member1, type the following command at the command prompt:

netdom renamecomputer member /newname:member1.contoso.com /userd:administrator

Additional references

Command-Line Syntax Key

Netdom

Netdom add

Netdom computername

Netdom join

Netdom move

Netdom query

Netdom remove

Netdom movent4bdc

Netdom reset

Netdom resetpwd

Netdom trust

Netdom verify