Join a domain using netdom

You can use netdom to quickly join a domain via cmd, the sytax of the command is

netdom join {/d: | /domain:} [/ou:] [{/ud: | /userd:}[] [{/pd: | /passwordd:}{|}]] [{/uo: | /usero} [{/po: | /passwordo}{|}] [/reboot[:,Delay>]] [/help | /?]

Parameters

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

{/d: | /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:

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:}[]

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:}{|*}

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}

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}{|*}

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[:]

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 | /?}

For Example

netdom join /d:mydomainlocal MyPCName

If you found this article helpful, would you consider buying me a Coffee?