How To Add a Computer to a Domain? [5 Methods + Remote Option]

Romj Amon
Romj Amon

Updated · Dec 12, 2022

SHARE:

Techjury is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission. Learn more.

Adding a computer to a domain can be tricky if you don’t know how to do it correctly.

In this article, we’ll show you several methods on how to add a computer to a domain, as well as how to leave a domain.

So, if you want to know more, keep on reading.

What is a Domain?

Domain-based networks are generally used in companies and larger organizations and allow network administrators to control a large number of PCs from a centralized device called a server or domain controller.

The administrators can manage the users’ access level and set restrictions on each system that’s joined to the domain. All the user accounts and passwords are managed on the domain controller, so users can log in with the same credentials on any computer that’s part of the domain.

Domains are especially useful for business organizations, as they allow all the users on the network to communicate and work together.

Active Directory is a popular network domain designed by Microsoft and used by thousands of organizations each day.

How To Join a Computer to a Domain?

Joining a computer to a domain can be done in a number of ways. We’ll explain some of them, but before we jump in, you need to make sure you have the following:

  • An Active Directory user account with permissions to add a computer to a domain
  • An AD domain
  • A Windows Enterprise, Pro, or Education version
  • RSAT package for using the command line

Windows Settings app

One of the ways to add your computer to a domain is through the Settings app. To do that, you need to:

  1. Right-click on the Start menu and select Settings.
  2. Navigate to Accounts>Access work or school and click Connect .
  3. In the pop-up window, click “Join this device to a Local Active Directory Domain” and select Next.
  4. Then, on the next page, type in your domain name and click Next.
  5. Enter the username and password for your domain account and click OK.
  6. Select your account type to continue. There are two options: Administrator or Standard User. Select one and click Next.
  7. Click Restart Now to complete the process of joining your computer to a domain.

Once the PC is restarted, you’ll be able to log into your computer with your domain user ID.

Graphical User Interface

One of the most popular methods for adding a computer to a domain is with the help of the GUI. And while this approach is probably not a good choice if you need to add multiple computers at once, it’s definitely suitable for adding one computer to a domain.

Here is how to join your computer to a domain via GUI:

  1. Run the command sysdm.cpl to open System Properties.
  2. Click the Change button, and in the Computer Name/Domain Changes dialog box, click on the Domain option.
  3. In the Domain box, type the name of the domain you want to add the computer to and click OK.
  4. Once the computer contacts the domain controller, you’ll need to add your domain credentials and click OK.
  5. If everything works fine, you’ll get a message welcoming you to the domain. Click OK and restart your computer to complete the process.

Command Prompt (Netdom)

Instead of the GUI, you can use Netdom to add a computer to a domain. To access the Netdom tool, you need to install the Remote Server Administration Tools package first.

Once you have the package, follow these steps:

  1. Open up cdm.exe as Administrator
  2. Next, you need to provide the following parameters

Syntax:

Netdom.exe join %computername% / domain: Domain01/ UserD: Domain01\admin/ PasswordD: Password
  1. Press Enter and reboot to add the PC to a domain. 

PowerShell

If you need to add multiple computers, you can also use PowerShell to add a PC to a domain. Here is what you need to do:

  1. Run Windows PowerShell as Administrator.
  2. Run the Add Computer cmdlet in PowerShell.
  3. Specify the name of the domain you want to add the computer to.
  4. Specify the restart parameter to restart the computer automatically.
  5. Optionally, you can use the OUpath parameter to specify an organizational unit.

Here’s an example:

Add Computer - DomainName Domain01 - Restart
  • Once you enter your credentials into the Add Computer cmdlet credentials prompt, the computer will reboot to make the change effective.

WMI

Another way to add a computer to a domain is by using Windows Management Instrumentation. This method uses the same process as netdom or the Add Computer PowerShell cmdlet.

Now, we’ll show you how to add a computer to a domain by using the WMIC command line utility and PowerShell.

WMIC

To add a PC to a domain using WMIC, follow these steps:

  1. Run cmd.exe as Administrator.
  2. Run the following command.
Wmic computersystem where name=%computername% call joindomainorworkgroup fjoinoptions=3 name=”Domain01” username= “Domain01\admin” Password= “password”

This command does the following:

  • Uses the “where” query to specify the local computer
    • (where name= %computername%)
  • Invokes the Win32_ComputerSystem WMI class’s WMI method
    • (call joindomainorworkgroup)
  • Specifies the appropriate bitwise operators to join the domain
    • (fjoinoptions=3)
  • Uses the admin user account to add the computer to the Domain01 domain

After everything is done, restart the computer to complete the process.

PowerShell

To invoke the JoinDomainOrWorkgroup WMI method using PowerShell, you need to:

  1. Open PowerShell as Administrator.
  2. Run the command below.
(Get-WMIObject - NameSpace “Root\Cimv2” - Class “Win32 ComputerSystem”). JoinDomainOrWorkgroup (“Domain01”,”password”, “Domain01\admin”, $null,3)

This command uses the same parameters as WMIC to perform the same task.

  • Restart your computer after everything is done

Add a PC Remotely

The WMI method in Powershell can also be used for adding a PC to a domain remotely, but you’ll need to use the ComputerName parameter on the Get-WMI Object cmdlet.

Here’s how to do that:

  1. Run PowerShell as Administrator on your local workstation (not the PC you’re joining to a domain).
  2. Run the following command.
Add-Computer -ComputerName windows10 -LocalCredential windows10\user01 -DomainName Domain01 -Credential Domain01\admin -Restart

This command:

  • Adds the remote computer called windows10 to the Domain01 domain.
  • Authenticates to the remote computer by using user01 local user.
  • Authenticates to the domain by using the admin domain account.
  • Automatically restarts the computer once it completes.

Note that, if a user is logged in, the Add Computer cmdlet won’t restart the remote computer unless you specify the Force switch parameter.

How To Confirm a Computer Joined a Domain

Every time a computer is added to a domain, a local object is created. To check if you were successful in adding your PC to a domain, you’ll need to open Active Directory Users and Computers and confirm that there is a new computer object.

To do that, do the following:

  1. Log into your domain controller and open ADUC (if you have the RSAT package installed, you can open ADUC on your local computer instead).
  2. In ADUC, select the domain name, which is Domain01 in this case, and open the Computers folder. You should see a computer object named windows10 that was added as per the previous section.
  3. Return to the Windows 10 computer and log in with any AD user account by clicking on the Other User option on the login screen.
  4. Under the Password box, you’ll see your domain name (Sign in to: Domain01).

How To Leave a Domain

If you want to remove your computer from a domain for any reason, there are several ways to do that.

We’ll show you how to leave a domain using the Settings app.

  1. Open the Windows Settings app.
  2. Navigate to Accounts>Access work or school.
  3. On the right-hand pane, select the icon that says Connected to DOMAIN01 AD domain and click on Disconnect.
  4. Click Yes to confirm.
  5. A “Disconnect from the organization” prompt will appear. Click on Disconnect and restart your computer to complete the process.

How To Join a Server to a Domain

To add a server to a domain, you need to do the following:

  1. Click the Start button on your Desktop and type in Control Panel.
  2. Navigate to System and Security and select System.
  3. Under Related Settings, click Rename this PC.
  4. Then, under the Computer Name tab, select Change.
  5. Click on the Domain option.
  6. Type in the name of the domain you want the server to join and click OK on the Computer Name/Domain Changes dialog box.
  7. Restart the server to complete the process.

The Bottom Line

All in all, there are multiple ways to add a computer to a domain. Each of them has its perks and downsides, but once you choose the right one for your needs, you can easily add your computer to a domain and take advantage of all the benefits that it has to offer. 

Remember to use Active Directory Users and Computers to double-check that your computer was successfully added to a domain.

FAQS.


Why can't I add my computer to a domain?

To be able to add a computer to a domain, your user account must be granted the Create Computer Object permissions in Active Directory.

Can a normal user add a computer to a domain?

Yes, if the user is authenticated, they can add computers to a domain.

How do you add a computer to a domain?

If you’re wondering how to add a computer to a domain, there are several ways to go about it. You can join the computer to a domain from the Settings app, by using the GUI, or via the command line with the help of PowerShell or WMI.

SHARE:

Romj Amon

Romj Amon

Romj is a veteran copywriter who used to be a Jack of all trades. Now, he's trying to be a master of one: technology. He jumps down the rabbit hole to size the latest innovations up. As a content contributor for TechJury, he hopes to help you keep up in our fast-paced world with his discoveries.

Leave your comment

Your email address will not be published.