Windows Server 2022 Domain Join

Server 2022 Domain Join KB ID 0001809

Problem

To join Windows Server 2022 to a Domain (Local Domain). The end proces is the same as it’s always been, they’ve just made the job of getting to there a little more convoluted, (this is the same with Windows 11).

Solution: Server 2022 Domain Join

Whilst logged in as a (local) administrative user, click the Windows button > Settings.

System.

About.

Advanced system settings.

Computer name > Change.

Select the domain radio button > Type in the domain name (must be resolvable in DNS, if in doubt try ‘pinging‘ the domain name” > OK > Enter a domain credential that has right to add machines to a domain. (Here I’m using the domain admin account, but normally a domain user can add a number (10 by default) of machines to a domain) > OK.

    

BUG / BAD UI ALERT: Minimise the window (because the popup box you are waiting for will appear behind it (please fix this Microsoft!)) > OK.

OK > OK.

Close.

Restart Now.

Post reboot, log in with domain credentials.

     

PowerShell: Server 2022 Domain Join

Open an Administrative PowerShell window.

Use the following command;

[box]

Add-Computer -DomainName pnl.com

[/box]

Enter a domain credential that has right to add machines to a domain. (Here I’m using the domain admin, but normally a user can add a number (10 by default) of machines to a domain) > OK.

After a few seconds, it should tell you to reboot, you can do so by entering;

[box]

Restart-Computer

[/box]

PowerShell: Remove Windows Server 2022 from a Domain

Open an Administrative PowerShell window. Use the following commands;

[box]

Remove-Computer
Restart-Computer

[/box]

Note: This will place the machine in a workgroup called WORKGROUP.

Related Articles, References, Credits, or External Links

How to Join Windows 11 to a Domain

How to Join a Windows Domain

Cannot Join Domain?

How to Join Windows 11 to a Domain

KB ID 0001764

Problem

If you need to join Windows 11 to a domain, then this is the procedure.

How To Join Windows 11 to a Domain (Local Domain)

Windows Button > Settings.

Scroll down to the ‘About‘ section and expand it.

In the ‘Device Specifications’ section (at the bottom) select ‘Domain or Workgroup’.

If you’re used to older versions of Windows, this should look familiar > Change > Select Domain > Enter your domain name > OK.

Note: If it fails at this point then ensure you have a valid IP address, and can resolve the domain name in DNS!

Provide a username and password for authentication to the domain (Note: a normal user can join a machine to the domain, though there is a limit of 10 machines that can join). Here Im using the domain admin account > OK > All being well, it should say ‘Welcome to the {domain-name} domain’‘ > OK > OK > OK > when prompted to reboot let it do so.

Remember post reboot it will try and log in with your local user, select Other User > Type in your domain username and password.

How To Join Windows 11 to a Domain (Local Domain) with PowerShell

Windows Button > In the search type PowerShell >Right click it > Run As Administrator.

Yes > Use the following syntax. Add-Computer –DomainName pnl.com -Credential PNL\administrator -Restart –Force > Provide the password for the user you specified in the command > the client will reboot automatically.

How To Join Windows 11 to a Domain (Local Domain) from  Command Line

Windows Button > In the search type CMD >Right click it > Run As Administrator.

 

Yes > Use the following syntax,  netdom join %computername% /domain:pnl.com /UserD:administrator /PasswordD:Password12345 > You can then reboot with a shutdown -r -f command.

Note: If you get an error that says netdom‘ is not recognised as an internal or external command, then thats because you need to install the RSAT tools.

Related Articles, References, Credits, or External Links

NA

Windows: Join Azure AD (AAD)

KB ID 0001596

Problem

With more people looking at Microsoft 365 (as opposed to Office 365), then the amount of people who want to Join Azure AD with their Windows machines is only going to go up. This is how to join your Windows and BYOD client devices to Azure AD.

There are essentially 3 WAYS to Join Azure AD.

  • Azure AD Join: Used for corporate assets. Windows Only! (Can be managed by Intune) Users log in with their Azure AD account only.
  • Azure AD Registration: Used for BYOD devices Windows/macOS/Android etc. (Can be managed by Intune). Users log in with their local credentials.
  • Hybrid Azure AD Join: Used for corporate assets you want to manage with GPO (or SCCM). Windows Only. These assets will be in a local (traditional on-premises domain).-WARNING: These devices require periodic sight of your on-premises AD, (or they become unusable). The Local domain needs to be connected to Azure AD with an Azure AD Connector.

Solution

 

Join Azure AD: Azure AD Join

Start > Settings > Accounts..

Access Work or School > Connect.

STOP! If you put your credentials in here you will Not join the machine to Azure AD you will perform an Azure Workplace Join (or be Azure Registered) that’s NOT WAHT WE WANT > Select “Join This Device to Azure Active Directory‘.

Enter your Azure AD/Office 365 Credentials > Next.

Join.

Done.

The machine will now show that it’s connected to.Azure AD

Note: The login screen now changes to ‘Sign in to: Your Work or School account‘.

Join Azure AD: Azure AD Register

Start > Settings > Accounts..

Access Work or School > Connect.

Enter your O365/M365/Azure credentials

Then after authenticating you ‘should’ see this.

How To Leave / Disconnect From Azure AD

Same place as above, select the connection and simply click ‘Disconnect‘.

Join Azure AD: How To Hybrid Join Azure AD

To Hybrid Azure AD join your machines to Azure AD, (this means they will already be in you local (traditional on-premises) domain, and then ‘additionally’ joined to Azure AD also. So your local domain needs to be syncing to Azure AD with Azure AD Connect. And you machines need to be Windows 10 (or Windows 8 with some additional requirements!)

You configure Hybrid Azure AD Join on the Azure AD Connector, like so;

Locate Your Azure AD Connect Server

Launching Azure AD from the Azure AD connect icon, will pause replication and allow you to make changes, locate ‘Configure Device Options’

 

Next >authenticate to Azure > Next.

Device Options > Configure Hybrid Azure AD Join > Next.

Next > Select Windows 10 (unless you have Windows 8 then theres some other hoops you have to jump though for that though) > Next

Tick you local domain > Edit  >Authenticate to AD (with an Enterprise Admin account) > Next.

Exit.

Now, be patient and wait it can take a while for your devices to start appearing in Azure, when they do that will look like this;

Related Articles, References, Credits, or External Links

Find The Azure AD Join Type

How to Join a Windows Domain

KB ID 000085

Problem

For Windows 11 See: How to Join Windows 11 to a Domain

This process was done with Windows 10, but the procedure is the same going all the way back to Windows 2000.

Solution

Note: The main reason this procedure fails, is because the client that you are attempting to perform the join from cannot resolve the domain name of your domain! Make sure it has one of your domain servers listed in the properties of its network connection, (or at least a method of resolving the name).

Problems Joining a Domain

1. Press Windows Key +E > Right Click ‘This PC’ > Preoperties.

 

2. Change Settings.

 

3. Computer Name Tab > Change.

4. Enter the domain name > OK..

5. Enter domain credentials, Note: A domain user has the right to join machines to a domain.

6. You should be welcomed to the new domain > OK.

7. You will need to reboot the machine to complete the process. > OK > OK.

8. OK > Restart Now.

Join a Windows Domain with PowerShell

From an administrative PowerShell Window, use the following commands;

[box]

Add-Computer -DomainName Your-Domain-Name
Restart-Computer

[/box]

Related Articles, References, Credits, or External Links

Windows: Join Azure AD (AAD)