大网数据广告活动
Windows排障命令

netdom renamecomputer

· 52CE 我爱测

Netdom renamecomputer is a command-line utility that renames a domain workstation or member server in Windows Server.

The netdom renamecomputer command renames a domain workstation or member server and its corresponding domain account. It's available if you have the Active Directory Domain Services (AD DS) server role installed. It's also available if you install the AD DS 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.

To use netdom renamecomputer, you must run the command from an elevated command prompt.

Syntax

netdom renamecomputer machine /NewName:new-name
                              [/UserD:user [/PasswordD:[password | *]]]
                              [/UserO:user [/PasswordO:[password | *]]]
                              [/Force] [/Reboot[:Time in seconds]]
                              [/SecurePasswordPrompt]

Parameters

Parameter Description
<machine> Specifies the name of the computer that you want to rename.
/newname:<NewComputerName> Specifies the new name of the computer.
/userd:<User> 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 using the /userd parameter. If you specify the value of this parameter as a wildcard character (*), this parameter prompts you for the password.
/usero:<User> 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 using the /usero parameter. If you specify the value of this parameter as a wildcard character (*), this parameter prompts you for the password.
/force When the /force parameter is specified, you aren't prompted for confirmation to rename a device.
/reboot:<seconds> Shuts down the computer and automatically reboots after the move operation completes. The seconds value is the number of seconds before automatic shutdown. The default is 20 seconds.
/securepasswordprompt Opens a secure credentials popup for entering credentials. This is useful when specifying smartcard credentials. This option is effective only when the password is entered as *.
help | /? Displays help at the command prompt.

Note: Don't use the netdom renamecomputer command to rename an AD DS domain controller (DC). Doing so Might cause the DC to no longer function as a DC on the network. Instead, use the netdom computername command.

Examples

To rename the member server MyServer to MyNewServer, run the following command:

netdom renamecomputer MyServer /newname:MyNewServer

If you don't have the appropriate permissions, the /userd and /passwordd parameters must be specified.

See also

Command-Line Syntax Key

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 06/09/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。