CmdID

CmdID / Commands / netdom

netdom add

The netdom add command adds a workstation or server account to a domain. Windows commands reference

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0

The netdom add command adds a workstation or server account to a domain. 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 add, you must run the command from an elevated command prompt.

netdom add machine [/Domain:domain] [/UserD:user] [/PasswordD:[password | *]]
[/Server:server] [/OU:ou path] [/DC] [/SecurePasswordPrompt]

To add the workstation mywksta to the domain reskita using the credentials of a domain administrator, run the following command

netdom add mywksta /domain:reskita /userd:domainadmin /passwordd:*Identify
/domainSpecifies the domain in which to create the account. Windows commands reference
/userdSpecifies the user account that makes the connection with the domain that you specify using the /domain parameter. Windows commands reference
/passwordd* Specifies the password of the user account that you specify using the /userd parameter. Windows commands reference

To add a computer named Srv01 to the domain reskita.com and specify the organizational unit (OU) where the computer account should be placed, run the following command

netdom add Srv01 /domain:reskita /OU:"OU=Servers,DC=reskita,DC=com" /userd:domainadmin /passwordd:*Identify
/domainSpecifies the domain in which to create the account. Windows commands reference
/OUSpecifies the organizational unit (OU) under which to create the account. Windows commands reference
/userdSpecifies the user account that makes the connection with the domain that you specify using the /domain parameter. Windows commands reference
/passwordd* Specifies the password of the user account that you specify using the /userd parameter. Windows commands reference
<machine>Specifies the name of the computer that you want to add.
/domain:<Domain>Specifies the domain in which to create the account. If you don't specify this parameter, then netdom add uses the domain that the current computer belongs to.
/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 add 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.
/server:<Server>Specifies the name of a domain controller that performs the add operation. This parameter can't be used with the /ou parameter.
/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 don't specify this parameter, netdom add creates the account under the default OU for computer objects for that domain.
/dcSpecifies 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. This parameter can't be used with the /ou parameter.
/securepasswordpromptOpens 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.