In this blog post, I will demonstrate the steps on how to join Windows 11 computer to domain. There are three main methods to do this:
- Using System Properties window.
- Using PowerShell.
- Using Command Prompt.
We will explore each of these methods, starting with the first one, which uses the graphical user interface (GUI) and is also the most common approach.
Contents
Prerequisites
- Windows 11 Pro/Enterprise/Education (Home cannot join a domain).
- A local administrator account.
- Domain controller Line-of-sight (on LAN or via VPN/DirectAccess/Always On VPN).
- DNS set to the AD DNS servers (typically your domain controllers). Do not point to public DNS.
- An account which rights to join a computer to a domain. By default, authenticated users can join computers to the domain. You can also delegate permissions to allow users to join a Windows computer to AD domain.
Method 1: Manually Join Windows 11 Computer to Domain
- Sign in to a machine using a local administrator account.
- Press Win + R keys together to open the Run dialog box.
- Type
sysdm.cpl
and press Enter to open System Properties window.
- Under Computer Name tab, click Change. Select Domain and enter the domain name, then click OK. When prompted, enter the credentials of a domain user with permission to join computers to the domain.
In my example, I created a dedicated standard account named WSJoiner and granted it the necessary permissions to join a computer to domain. For guidance to setup a dedicated account with domain join permission, you can use delegated permissions on the container/OU. Refer to Method 2 on this guide: #method-2-delegate-join-rights-on-a-target-ou for more details.
- If the credentials are validated successfully, you will get a pop-up with a message Welcome to the <domain name>. This confirms that the computer has been joined to the active directory domain.
- A restart is required to complete the changes. Save all your work and restart your computer.
- After the reboot, you can sign in to the computer using domain credentials.
- You can verify domain membership of a computer from System properties window.
Method 2: Add Windows 11 Computer to Domain using PowerShell
A quick method to join a computer to a domain is to use a simple PowerShell one-liner command. I am providing multiple code snippets below, you can use any of the code snippet as per your requirement.
- Open PowerShell as an administrator and run any below provided code snippet. Replace the values in bold with your domain details before executing the command.
Domain Join Script 1 (Simply Add a computer to domain using Add-Computer)
# Basic: prompt for credentials and join the domain
$cred = Get-Credential # e.g., TechPress\WSJoiner
Add-Computer -DomainName "corp.techpress.net" -Credential $cred -Restart -Force
Domain Join Script 2 (Join to a specific OU and set a new computer name)
# Join to a specific OU and set a new computer name
$cred = Get-Credential 'TechPress\WSJoiner'
Add-Computer -DomainName "corp.techpress.net" `
-NewName "LAP-001" `
-OUPath "OU=Workstations,DC=corp,DC=techpress,DC=net" `
-Credential $cred -Restart -Force
Domain Join Script 3 (Rename first, then join)
Rename-Computer -NewName "LAP-001" -Force
$cred = Get-Credential 'TechPress\WSJoiner'
Add-Computer -DomainName "corp.techpress.net" -Credential $cred -Restart -Force
Method 3: Join Windows 11 to a Domain using Command Prompt
You can also use Command prompt in Windows 11 computers to join a computer to the active directory domain. Let’s check the steps:
- Open Command prompt as an administrator and run any below provided code snippet as per the requirement. Replace the values in bold with your domain details before executing the command.
/reboot:5
switch reboots the computer automatically after 5 seconds./PasswordD:*
Replace the * with the actual password of a user account specified.
Online Join (Basic)
netdom join %COMPUTERNAME% /domain:corp.techpress.net /UserD:TECHPRESS\WSJoiner /PasswordD:* /reboot:5
Online join to a specific OU
netdom join %COMPUTERNAME% /domain:corp.techpress.net ^
/OU:"OU=Workstations,DC=corp,DC=techpress,DC=net" ^
/UserD:TECHPRESS\WSJoiner /PasswordD:* /reboot:5
Rename, then join
netdom renamecomputer %COMPUTERNAME% /newname:LAP-001 /reboot:0
:: After reboot:
netdom join LAP-001 /domain:corp.techpress.net /UserD:TECHPRESS\WSJoiner /PasswordD:* /reboot:5