Share via


Netdom join

Applies To: Windows Server 2008, Windows Server 2008 R2

Joins a workstation or member server to a domain. The act of joining a computer to a domain creates an account for the computer on the domain, if it does not already exist.

Netdom is a command-line tool that is built into Windows Server 2008and 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 join <Computer> {/d: | /domain:}<Domain> [/ou:<OUPath>] [{/ud: | /userd:}[<Domain>\]<User> [{/pd: | /passwordd:}{<Password>|*}]] [{/uo: | /usero}<User> [{/po: | /passwordo}{<Password>|*}] [/reboot[:,Delay>]] [/help | /?]

Parameters

Note

When you join a computer running Windows NT 4.0 or earlier to the domain, the operation is not transacted. This means that a failure during the operation might leave the computer in an undetermined state with respect to the domain to which you intended to join it.

Parameter Description

<Computer>

Specifies the name of the computer that you want to join to the domain.

{/d: | /domain:}<Domain>

Specifies the domain that you want to join the computer to. If you do not specify this parameter, then netdom join uses the domain to which the current computer belongs.

/ou:<OUPath>

Specifies the organizational unit (OU) under which you want to create the account. You must specify the full RFC 1779 distinguished name of the OU. If you do not specify this parameter, netdom join creates the account under the default OU for computer objects for that domain.

{/ud: | /userd:}[<Domain>\]<User>

Specifies the user account that makes the connection with the domain that you specify in the /d or /domain parameter. If you do not specify this parameter, netdom join uses the current user account.

{/pd: | /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.

{/uo: | /usero}<User>

Specifies the user account that makes the connection with the computer that you want to join to the domain. If you do not specify this parameter, netdom join uses the current user account.

{/po: | /passwordo}{<Password>|*}

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

/reboot[:<Delay>]

Specifies to shut down the computer and automatically reboot after the join operation has completed. 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.

Examples

To join mywksta to the devgroup.contoso.com domain in the Dsys/workstations OU, type the following command at the command prompt:

netdom join /d:devgroup.contoso.com mywksta /OU:OU=Dsys,OU=Workstations,DC=devgroup,DC=contoso,DC=com

Besides adding the computer account to the domain, this command modifies the workstation to contain the appropriate shared secret to complete the Join operation.

Additional references

Command-Line Syntax Key

Netdom

Netdom add

Netdom computername

Netdom move

Netdom query

Netdom remove

Netdom movent4bdc

Netdom renamecomputer

Netdom reset

Netdom resetpwd

Netdom trust

Netdom verify