Updated · Jan 10, 2024
Rmoj Amon is a professional copywriter with a special love for technology and curiosity about Window... | See full bio
Updated · Jul 27, 2023
Rmoj Amon is a professional copywriter with a special love for technology and curiosity about Window... | See full bio
Girlie is an accomplished writer with an interest in technology and literature. With years of experi... | See full bio
My name is Ilyoskhuja, and I am a seasoned software engineer with over 9 years of experience in the ... | See full bio
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.
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.
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:
One of the ways to add your computer to a domain is through the Settings app. To do that, you need to:
Once the PC is restarted, you’ll be able to log into your computer with your domain user ID.
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:
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:
Syntax:
Netdom.exe join %computername% / domain: Domain01/ UserD: Domain01\admin/ PasswordD: Password |
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:
Here’s an example:
Add Computer - DomainName Domain01 - Restart |
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.
To add a PC to a domain using WMIC, follow these steps:
Wmic computersystem where name=%computername% call joindomainorworkgroup fjoinoptions=3 name=”Domain01” username= “Domain01\admin” Password= “password” |
This command does the following:
After everything is done, restart the computer to complete the process.
To invoke the JoinDomainOrWorkgroup WMI method using PowerShell, you need to:
(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.
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:
Add-Computer -ComputerName windows10 -LocalCredential windows10\user01 -DomainName Domain01 -Credential Domain01\admin -Restart |
This command:
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.
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:
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.
To add a server to a domain, you need to do the following:
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.
To be able to add a computer to a domain, your user account must be granted the Create Computer Object permissions in Active Directory.
Yes, if the user is authenticated, they can add computers 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.
Your email address will not be published.
Updated · Jan 10, 2024
Updated · Jan 09, 2024
Updated · Jan 05, 2024
Updated · Jan 03, 2024