Four things must be true before you touch a setting. The PC runs Windows 11 Pro, Pro for Workstations, Education or Enterprise, because Home has no domain option. Its DNS server is a domain controller, not the router or a public resolver. You have a domain account allowed to join computers. And you can sign in to the PC as a local administrator. With those in place, the join (Settings > Accounts > Access work or school > Connect) takes a few minutes and one restart.
The pre-join checklist, explained
Most failed joins trace back to one of these items, so it pays to check them in order. The same steps apply to Windows 10 Pro 22H2, although Windows 10 no longer gets regular support.
1. Edition
Open Settings > System > About and read the Edition line under Windows specifications. Microsoft lists the ability to join a domain or Microsoft Entra ID among the features of the Pro editions in its page on upgrading Windows Home to Windows Pro, which is also the route if your PC came with Home. If you only need to reach a Home PC from another machine rather than manage it centrally, the options are covered in Remote Desktop alternatives for Windows 11 Home. Not sure which edition or build you have? Checking your Windows edition, version and build shows every place to look.
2. DNS and a route to a domain controller
Windows finds the domain by asking DNS for the domain controllers of that domain. If the network adapter points at a home router or a public DNS service, the join fails with a “could not be contacted” message even when the cable is plugged in. Set the adapter’s preferred DNS server to a domain controller’s IP address (or let your office DHCP hand it out), then test from Command Prompt:
- nslookup corp.example.com should return one or more domain controller addresses.
- ping corp.example.com confirms basic reachability, although some networks block ping.
The adapter’s DNS fields are in the same place as any custom DNS change, described in changing DNS servers on Windows 11. Remote staff need a VPN that is connected before the join, and a static IP address is not required.
3. Permission to join
Domain admins can join computers. Microsoft also documents a default that lets any authenticated domain user join up to 10 machine accounts, controlled by the ms-DS-MachineAccountQuota attribute. Many organizations lower that to zero and delegate the right to a help desk group instead, so ask which account to use rather than assuming yours works.
4. Local administrator rights and a known local password
Microsoft’s join documentation requires administrative rights on the local machine as well as an account that can join on the domain side. Write down the local admin username and password too: you need them later if the domain is unreachable or you leave the domain.
5. Computer name and clock
The computer name becomes the computer object in Active Directory, so rename the PC first if it still has a random name like DESKTOP-7Q2K9LM. Use Settings > System > About > Rename this PC, or Rename-Computer -NewName “ACC-LT-014” -Restart in an elevated PowerShell window. Also check the clock. Kerberos, the sign-in protocol domains use, rejects requests when clocks drift too far apart, and the default tolerance in the Default Domain Policy is 5 minutes.
Pick a join route
| Route | Best for | Limits |
|---|---|---|
| Settings app | One PC, a technician at the keyboard | Computer lands in the default Computers container |
| System Properties (sysdm.cpl) | The classic dialog Microsoft documents; works the same on Windows 10 and Server | Same default container |
| PowerShell Add-Computer | Scripts, remote joins, placing the PC in a chosen OU and renaming in one step | Needs Windows PowerShell 5.1, not PowerShell 7 |
Join from the Settings app
- Sign in with the local administrator account and open Settings > Accounts > Access work or school. Typing ms-settings:workplace in the Run box (Windows key + R) opens the same page.
- Select Connect. A Microsoft sign-in window appears; that is the Entra route, so ignore the email field.
- Choose the link Join this device to a local Active Directory domain near the bottom of that window.
Illustration: The domain join link sits below the Microsoft sign-in box. - Type the domain name, such as corp.example.com, and select Next.
- Enter the domain account that is allowed to join computers, as CORP\username or username@corp.example.com.
- If Windows offers to add an account to the PC, you can skip it. Many admins prefer to grant local admin rights through Group Policy rather than per PC.
- Restart when Windows prompts you. The join is not finished until the PC restarts.
If the join link is missing, check the edition first; that is the usual cause.
Join from System Properties
This is the dialog in Microsoft’s join a computer to a domain instructions, and it has not changed in years.
- Press Windows key + R, type sysdm.cpl and press Enter. (Settings > System > About > Domain or workgroup opens the same window.)
- On the Computer Name tab, select Change.
- Under Member of, select Domain, type the domain name and select OK.
Illustration: Select Domain, type the domain name, then enter join credentials. - Enter the credentials of an account that can join computers and select OK.
- A welcome message confirms the membership. Select OK, close the dialog, and restart when prompted.
Join with PowerShell
Open Windows PowerShell as administrator. Microsoft lists Add-Computer and Remove-Computer among the cmdlets removed from PowerShell 7, so run these in the built-in Windows PowerShell 5.1, not pwsh.
Worked example: Priya, the IT lead at a fictional firm, needs laptop ACC-LT-014 in the Accounting OU of corp.example.com. Instead of joining and then dragging the object around in Active Directory, she runs:
Add-Computer -DomainName corp.example.com -Credential CORP\priya.admin -OUPath “OU=Laptops,OU=Accounting,DC=corp,DC=example,DC=com” -Restart

Windows prompts for the password, creates the computer account in that OU and restarts. The Add-Computer reference also documents -NewName (rename during the join), -Server (pick a specific domain controller) and -ComputerName for joining remote PCs.
If the Active Directory tools (RSAT) are installed on the PC, Microsoft’s Command Prompt equivalent is netdom join %COMPUTERNAME% /domain:corp.example.com /userd:CORP\priya.admin /passwordd:*. The asterisk makes netdom ask for the password; never type a password into the command itself, where it can end up in history or logs.
Prestage the computer account (optional, for admins)
Prestaging creates the computer object before the PC joins, so it lands in the right organizational unit (OU) and you control who may join it. In Active Directory Users and Computers, select the target OU, choose Action > New > Computer, enter the exact computer name and choose which user or group may join it. If ADUC is not on your admin PC yet, installing the Active Directory tools (RSAT) on Windows 11 adds it through Optional features, and opening Active Directory Users and Computers covers launching it afterwards.
First sign-in after the restart
- On the sign-in screen, select Other user.
- Type the domain account as CORP\alex or alex@corp.example.com, plus its password. The first domain sign-in needs the PC to reach a domain controller.
- To sign in with the local account instead, type .\ before its name, such as .\localadmin.
A domain account gets its own new profile, so the desktop looks fresh. Files under the old local account stay where they were; copy what you need from C:\Users\<old name> while signed in as an administrator. Domain users are typically not local administrators unless policy or an admin adds them; making an account an administrator on Windows 11 shows the manual route. Group Policy can also lock down parts of Windows, such as whether users can move or resize the taskbar (see how to lock the taskbar on Windows 11 PCs).
Confirm the join worked
- whoami in Command Prompt returns DOMAIN\username when you are signed in with a domain account.
- (Get-CimInstance Win32_ComputerSystem).Domain in PowerShell returns the domain name instead of WORKGROUP.
- dsregcmd /status shows DomainJoined : YES and the DomainName. If AzureAdJoined is also YES, the PC is Microsoft Entra hybrid joined, per Microsoft’s dsregcmd device state table.
Illustration: DomainJoined : YES confirms Active Directory membership. - gpupdate /force pulls Group Policy right away rather than waiting for the next refresh.
Active Directory join or Microsoft Entra join?
Both appear on the same Access work or school page, which confuses people. Active Directory join ties the PC to on-premises domain controllers and Group Policy. Microsoft Entra join ties it to the cloud directory, usually managed with Intune, and is available on all Windows 11 and Windows 10 editions except Home. Organizations that run both often use hybrid join, where the PC joins AD first and then registers with Entra. If your IT team sent you a work email address and an Intune enrollment notice rather than a domain name, they want Entra join, not this procedure.
Leaving the domain without locking yourself out
Confirm the local admin password works first (sign in with .\localadmin once). After the PC leaves, domain accounts can no longer sign in, and a forgotten local password on a PC that is no longer on a domain is handled the same way as on a home PC, shown in this walkthrough for a lost Windows 10 password.
- Settings: Accounts > Access work or school, expand the domain entry and select Disconnect.
- System Properties: sysdm.cpl > Change > Member of Workgroup, type a workgroup name, then restart.
- PowerShell: Remove-Computer -UnjoinDomainCredential CORP\priya.admin -WorkgroupName WORKGROUP -Restart. Microsoft notes the computer’s domain account is disabled, not deleted.
Clean up the old computer object in Active Directory afterwards if the PC is being retired or reassigned.
Domain join problems and answers
“An Active Directory Domain Controller for the domain could not be contacted”
This is almost always DNS. Rerun nslookup for the domain name, confirm the adapter’s DNS server is a domain controller, run ipconfig /flushdns, and check that the VPN is connected. Also check the spelling, and try the full domain name (corp.example.com) rather than the short NetBIOS name.
“An account with the same name exists in Active Directory. Re-using the account was blocked by security policy.”
That is error 0xaac from the domain join hardening in KB5020276. Windows now refuses to reuse an existing computer object unless you created it, a domain admin created it, or its owner is on the allow list in the “Domain controller: Allow computer account re-use during domain join” policy. Details land in C:\Windows\debug\netsetup.log. The quick fixes are to have a domain admin run the join, delete the stale object, or pick a new computer name.
Access denied or “exceeded the maximum number of computer accounts”
Your account has hit the machine account quota or has no join rights. Ask an admin to prestage the computer and grant you permission on it, or to run the join with a delegated account.
“The trust relationship between this workstation and the primary domain failed”
The PC’s machine password no longer matches Active Directory. Sign in with the local admin account, open an elevated Windows PowerShell window and run Test-ComputerSecureChannel. If it returns False, run Test-ComputerSecureChannel -Repair -Credential (Get-Credential) with a domain account allowed to reset the computer, then restart, as Microsoft’s join article shows. With the RSAT Active Directory tools installed, netdom verify, netdom resetpwd and netdom reset do the same from Command Prompt. Leaving and rejoining the domain also works.
Can I join from home over Wi-Fi?
Only if the PC can reach a domain controller at that moment, which normally means a VPN connection established before you start. Without it, every route fails at the “could not be contacted” stage.
Can I move a PC straight from one domain to another?
Yes. Add-Computer accepts -UnjoinDomainCredential for the old domain and -Credential for the new one, and Microsoft’s reference includes an example that moves computers between domains in one command. In the GUI, leave the first domain, restart, then join the second.
Once the PC is joined and you can sign in as a domain user, run gpupdate /force, restart once more, and confirm that drive mappings, printers and policies arrived as expected before handing the PC to its user.


