Export (0) Print
Expand All

Netdom add

Published: April 17, 2012

Updated: April 17, 2012

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

Adds a workstation or server account to the domain.

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 (http://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.

netdom add <Computer> {/d: | /domain:} <Domain> [{/ud: | /userd:}[ <Domain>\]<User> {/pd: | /passwordd:}{ <Password>|*}] [{/s: | /server:} <Server>] [/ou: <OUPath>] [/dc] [/help | /?]

 

Parameter Description

<Computer>

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

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

Specifies the domain in which to create the account. If you do not specify this parameter, then netdom add uses the domain that the current computer belongs to.

{/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 add 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.

{/s: | /server:} <Server>

Specifies the name of a domain controller that performs the Add operation.

/ou: <OUPath>

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

dc

Specifies that a domain controller's machine account is to be created. This makes it possible for the computer accounts for new AD DS domain controllers, and new Windows NT 4.0 backup domain controllers (BDCs) to be pre-created. If installing a new Windows NT 4.0 BDC into an existing Windows 2000 or Windows Server 2003 domain, the computer account must be pre-created. This parameter cannot be used with the /ou parameter.

{/help | /?}

Displays help at the command prompt.

To add the workstation mywksta to the Windows NT 4.0 domain reskita, type the following command at the command prompt:

netdom add /d:reskita mywksta /ud:mydomain\admin /pd:password

To add the workstation mywksta to the Windows Server 2003 domain devgroup.example.com in the OU Dsys/workstations, type the following command at the command prompt:

netdom add/d:devgroup.example.com mywksta /OU:OU=Dsys,OU=Workstations,DC=contoso,DC=com
noteNote
If you do not specify the /ou parameter, netdom creates the account in the Computers container.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft