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

Netdom move

· 52CE 我爱测

Netdom move is a command-line utility moves a workstation or member server to a new domain in Windows Server.

The netdom move command moves a workstation or member server to a new domain. The act of moving a computer to a new domain creates an account for the computer on the domain, if it doesn't already exist. 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). To use netdom move, you must run the command from an elevated command prompt.

Syntax

netdom move machine /Domain:domain [/OU:ou path]
                    [/UserD:user] [/PasswordD:[password | *]]
                    [/UserO:user] [/PasswordO:[password | *]]
                    [/UserF:user] [/PasswordF:[password | *]]
                    [/Reboot[:Time in seconds]]
                    [/SecurePasswordPrompt]

Parameters

Note: When you move a computer to a new domain, netdom move doesn't delete its computer account in the former domain. However, if you supply credentials for the former domain, this command disables the old computer account.

Parameter Description
<machine> Specifies the name of the computer that you want to move.
/domain:<Domain> Specifies the domain to which you want to move the account. If you don't specify the parameter, then netdom move uses the domain to which the current computer belongs.
/ou:<OUPath> Specifies the organizational unit (OU) under which to create the account. This must be the full RFC 1779 distinguished name of the OU. If you don't specify this parameter, netdom move creates the account under the default OU for computer objects for that domain.
/userd:<User> Specifies the user account that makes the connection with the domain that you specify using the /domain parameter. If you don't specify this parameter, netdom move uses the current user account.
/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 to make the connection with the computer that you want to move. If you don't specify this parameter, netdom move uses the current user account.
/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.
/userf:<User> Specifies the user account to make the connection with the computer's former domain (of which the computer was a member before the move). This parameter is used to disable the old computer account.
/passwordf:<Password> | * Specifies the password of the user account that you specify using the /userf parameter. If you specify the value of this parameter as a wildcard character (*), this parameter prompts you for the password.
/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.

Examples

To move mywksta from its current domain into the MyDomain domain, run the following command:

netdom move mywksta /domain:mydomain /userd:mydomain\admin /passwordd:*

If the destination is an AD DS domain, this command updates the Security ID history for the workstation, retaining the security permissions that the computer account had previously.

To move Srv01 to the domain NewDomain and specify the OU, run the following command:

netdom move svr01 /domain:newdomain /ou:"OU=Workstations,OU=Resources,DC=NewDomain,DC=local" /userd:NewDomain\DomainAdmin /passwordd:*

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)

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

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