Join Windows to Domain from the Command Line with CMD

  • Service Provider

    Joining a domain from the command line is very important in the era of Server Core. With new server builds, likely you will have to do this regularly. The NETDOM JOIN command makes this very quick and simple. Using %computername% makes this even easier to do for the local machine where we will be performing the task nearly always.

    NETDOM JOIN %computername% / /userd:administrator /passwordd:secretstuff

    If you want to perform this task on a remote machine simply replace %computername% with the name of the remote machine you wish to modify.

    As always with domain joins, you must ensure that networking is set up correctly and DNS is resolving correctly before attempting to join.

    Originally on my Windows administration blog circa 2013 here: