Join Windows Machine to Domain

Adding users to Active Directory (AD) is a common administrative task that allows organizations to manage user accounts and permissions effectively. In this guide, we’ll explore two methods for adding Active Directory users: using the GUI (Graphical User Interface) and PowerShell commands.
Join Windows Machine to Domain via GUI
Log into the machine as a local administrator
Change DNS Settings to point to the Domain Controller
- Right click on
Settings - Click
Network Connections - Click
Ethernet

Add the IP address of the domain controller in the Preferred DNS box, click Save

Right click on Windows icon and select System, then Click Domain or workgroup link next to Related links section. You will be prompted for admin rights.

In the Computer Name tab, select the Change button

Check the Domain box and enter the domain information. Click OK

Domain admin credentials are required.

After successful authentication, a welcome message is displayed. Restart the machine.

You may now authentication with any domain user. Click on Other user and authentication with a domain user account.

Join Windows Machine to Domain via Powershell
Login as a user who has local admin rights and launch powershell as admin
Display network interfaces
Get-NetIPInterface -AddressFamily IPv4

Change DNS setting to refer to AD DS domain controller
Set-DnsClientServerAddress -InterfaceIndex 7 -ServerAddresses “192.168.1.113” -PassThru

Join to the domain.
- For
usernameadd the correct domain user - For
userpasswordadd the correct password for that userAdd-Computer -DomainName “jpc.net” -Credential (New-Object PSCredential “username”, (ConvertTo-SecureString -AsPlainText “userpassword” -Force))
Restart the computer
Restart-Computer -Force
After restarting, verify to logon as a domain user

Make sure the domain information is registered correctly

Conclusion
Joining a Windows machine to a domain is a fundamental task when integrating Windows systems into an Active Directory environment. Whether you choose to use the GUI method or the PowerShell approach, ensure that your DNS settings are correct, and you have the necessary credentials.
The GUI method provides a user-friendly interface for domain joining and is recommended for users who prefer a graphical approach. On the other hand, the PowerShell method is ideal for automation or situations where you need to script the domain joining process.
Whichever method you choose, successfully joining a machine to a domain is an essential step in managing user accounts, security policies, and network resources in a Windows domain environment!