How to Configure Active Directory on Windows Server 2019

Overview

This guide assumes that:

  • You own a domain.
  • You have Windows Server 2019 installed to a server.

Windows Server 2019

Set Static IP

It is best practice to configure your server to a static IP address instead of using DHCP. To do so follow the steps below.

Open a Command Prompt and run:

1control.exe /name Microsoft.NetworkAndSharingCenter

Network and Sharing Center should open. Now navigate to Change adapter settings, then right click on your network adapter and click Properties. Double click on "Internet Protocol Version 4 (TCP/IPv4)". Switch from Obtain an IP address automatically to Use the following IP address.

Change the IP address to one that is in the subnet that your server is connected to. For instance, my server is a part of the 192.168.10.0/24 subnet. My server IP address is set to 192.168.10.3 for simplicity.

Change your Subnet mask to the subnet mask of your subnet. E.g. 255.255.255.0 for me.

Change your Default gateway to your router's IP that is on the same subnet. Mine is 192.168.10.2 in this instance.

Change your DNS server to any DNS server you wish, e.g. 1.1.1.1 for Cloudflare DNS.

Server IPv4 Properties

Add Active Directory and DNS role

Now we will add the Active Directory Domain Services and DNS roles to the server.

Press the Windows key and type "Server Manager" and run it.

Click on Add roles and features

Server Manager with Add roles and features highlighted

Click Next

Roles and Features Wizard Page 1

Select "Role-based or feature-based installation".

Roles and Features Wizard Page 2

Select your server then click Next.

Roles and Features Wizard Page 3

Tick Active Directory Domain Services and DNS Server roles, follow the prompts for each role, then click Next.

Roles and Features Wizard Page 4

Active Directory Features

DNS Features

Click Next

Roles and Features Wizard Page 5

Click Next.

Roles and Features Wizard Page 6

Click Next.

Roles and Features Wizard Page 7

Click Install, then Close.

Roles and Features Wizard Page 8

You can check the status of the role installation by clicking the flag icon.

Feature installation notification

Post-deployment Configuration

You should see a yellow triangle next to the flag icon, click it and then click Promote this server to a domain controller. You may need to click the refresh button for this to show up.

Post-deploy Configuration notification

Select Add a new forest and specify your domain name for Active Directory, then click Next. A few popular choices for your Root domain name are: ad.example.com, corp.example.com and local.example.com. Replace example.com with your domain name.

Active Directory Domain Services Wizard Page 1

Enter a password for DSRM, DSRM will allow an administrator repair or restore an Active Directory database, then click Next.

Active Directory Domain Services Wizard Page 2

Click Next.

Active Directory Domain Services Wizard Page 3

Click Next.

Active Directory Domain Services Wizard Page 4

Click Next.

Active Directory Domain Services Wizard Page 5

Review your selections, then click Next.

Active Directory Domain Services Wizard Page 6

The wizard will then validate prerequisites.

Active Directory Domain Services Wizard Page 7

Once it is done click Install, then the server will restart.

Active Directory Domain Services Wizard Page 8

Add Users and Groups

Once your server has restarted, it will be a part of your AD domain. Log in and run Server Manager again. We will now add new users and groups to our AD domain.

Navigate to Tools -> Active Directory Users and Computers.

Tools Context Menu with Active DIrectory Users and Computers highlighted

Active Directory Users and Computers Configuration Window

Add Users

Click the dropdown arrow next to your domain name, then click on users, and right click and select New -> User.

Context menu with New -> User highlighted

Fill in the details like so and click Next.

Active Directory User Configuration

Enter a password, it must contain an upper-case, lower-case, and special character, then make sure User must change password at next login is ticked, this is best practice, then click Next and then Finish.

Active Directory User Password Configuration

Add groups

Click the dropdown arrow next to your domain name, then click on users, and right click and select New -> Group.

Context menu with New -> Group highlighted

Fill in the details like so then click OK.

Active Directory Group Configuration

Windows 10 Client

Join Active Directory Domain

We will use a Windows 10 client to join our AD domain.

Set DNS Server

The first thing we need to do is change our DNS server to the IP address of our domain controller on our client. Preferably you'd want to set this as DHCP option on your DHCP server. For this demonstration we'll just change it manually.

Open a Command Prompt and run:

1control.exe /name Microsoft.NetworkAndSharingCenter

Network and Sharing Center should open. Now navigate to Change adapter settings, then right click on your network adapter and click Properties. Double click on "Internet Protocol Version 4 (TCP/IPv4)". Switch "Obtain DNS server address automatically" to "Use the following DNS server addresses".

Change your DNS server the to domain controller's IP address, e.g. 192.168.10.3

Client IPv4 Properties

Create An Account to Join the Domain

Follow the Add Users section again with a new user but this time untick "User must change password at next login". We will use this account to join computers to the domain.

Join Domain

Press the Windows key then type "Access work or school" and hit enter.

Start Menu with Access Work or School highlighted

Click Connect.

Access Work or School Settings

Click Join this device to a local Active Directory domain.

Join a Local AD Domain

Type in your Active Directory domain name, then click Next.

Join a domain

Enter your user credentials that you created above, then click OK.

User Credentials for the AD domain

Click Skip, then Restart Now.

User Configuration for the domain

Once your computer has restarted, click on Other user, then login with one of your AD user accounts.

Windows Login Screen

Since we had "User must change password at next login" ticked, we'll get a prompt to change the password, click OK and fill in a new password.

Windows Login Screen Change Password Prompt

Conclusion

You've successfully created an AD domain and joined a Windows 10 computer to the AD domain!