How to install Active Directory on Windows Server 2019

How to install Active Directory on Windows Server 2019: add the AD DS role, create a new forest, promote the domain controller and join PCs, with PowerShell.

MSM TECHNOLOGIES7 min read · 2 October 2023
An IT administrator at his desk

To install Active Directory on Windows Server 2019, give the server a static IP address, add the Active Directory Domain Services (AD DS) role in Server Manager, then promote the server to a domain controller by creating a new forest with DNS. After the restart, point each client PC at the server for DNS and join it to the domain.

This guide builds a one-server lab for the domain eu-new.lan, with a screenshot for each step and the PowerShell equivalent from Microsoft Learn.

  • Install the role: Server Manager → Add Roles and Features → Active Directory Domain Services.

  • Promote the server: create a new forest, let the wizard install DNS, and set a Directory Services Restore Mode (DSRM) password.

  • Join clients: set their DNS server to the domain controller, then join the domain and restart.

  • Sign in on any joined computer with one domain account.

What is Active Directory?

Active Directory Domain Services (AD DS) is Microsoft’s directory service for Windows networks. It stores users, computers and groups, and checks who can sign in and what they can reach (Microsoft’s AD DS overview).

A server running AD DS is a domain controller. Computers joined to its domain send sign-ins to it, so an employee uses one account on every company computer, and an administrator disables one account when someone leaves.

Does this work on Windows Server 2022 and 2025?

Yes. Microsoft’s AD DS installation guide applies to Windows Server 2016, 2019, 2022 and 2025 (checked November 2026), and the wizard pages and PowerShell cmdlets in this guide are the same on all four.

The one difference is the functional level offered during promotion. Windows Server 2019 and 2022 top out at the Windows Server 2016 level. Windows Server 2025 adds a Windows Server 2025 level, which only domain controllers running 2025 support (functional levels). Choose it only if every domain controller in the forest will run 2025.

Windows Server 2019 itself gets security updates until January 2029, per Microsoft’s lifecycle page.

What you need before you start

To create a new forest, you must be signed in as the server’s local Administrator. You also need a static IP plan; this lab uses the subnet 172.16.10.0/24 (mask 255.255.255.0):

Machine

Name

IP address

Domain controller

server-eu

172.16.10.10

Client

wks-1

172.16.10.101

The full names (FQDNs) are server-eu.eu-new.lan and wks-1.eu-new.lan. The client in the screenshots runs Windows 10; Microsoft’s domain-join steps cover Windows 11 too.

eu-new.lan is fine for a lab. For a company forest, Microsoft recommends a subdomain of a domain you have registered, such as corp.example.com, and advises against unregistered suffixes such as .local (choosing the forest root name). The forest name is hard to change later, so decide before you promote.

Step 1: Name the server and give it a static IP address

Set the server’s final name and a fixed address first. Clients find the domain controller through DNS at this address, and renaming a domain controller after promotion takes extra steps.

  1. Rename the computer to server-eu and restart.

  2. Open the adapter’s Internet Protocol Version 4 (TCP/IPv4) properties.

  3. Set the IP address to 172.16.10.10 and the mask to 255.255.255.0.

Windows Server 2019 system properties with the computer name set to server-euNetwork adapter properties on server-eu with Internet Protocol Version 4 selectedIPv4 properties on server-eu with static IP address 172.16.10.10 and mask 255.255.255.0

The lab screenshots show IPv6 unticked to keep the setup IPv4 only. On a real network, leave IPv6 on: Microsoft doesn’t recommend disabling IPv6, because some Windows components might not work without it.

Rename-Computer -NewName "server-eu" -Restart
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 172.16.10.10 -PrefixLength 24

Step 2: How to install Active Directory on Windows Server 2019 (the AD DS role)

Installing the AD DS role copies the files a domain controller needs. The server isn’t a domain controller until you promote it in step 3.

  1. In Server Manager, select Manage → Add Roles and Features.

  2. On Before you begin, select Next.

  3. Choose Role-based or feature-based installation.

  4. Select this server (server-eu) from the server pool.

  5. On Server Roles, tick Active Directory Domain Services and select Add Features.

  6. Leave the Features page as it is.

  7. Read the AD DS page, then confirm and select Install.

  8. When the installation finishes, the results page offers Promote this server to a domain controller.

Server Manager Manage menu with Add Roles and Features selectedAdd Roles and Features wizard, Before You Begin pageAdd Roles and Features wizard with role-based or feature-based installation selectedAdd Roles and Features wizard, server selection with server-eu selectedAdd Roles and Features wizard with Active Directory Domain Services selectedAdd Roles and Features wizard, Features page left at its defaultsAdd Roles and Features wizard, Active Directory Domain Services information and confirmationAD DS installation results with the Promote this server to a domain controller link

The PowerShell equivalent. Without -IncludeManagementTools, the cmdlet skips tools such as Active Directory Users and Computers:

Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools

Step 3: Promote the server to a domain controller

Promotion turns the server into the first domain controller of a new forest. The Active Directory Domain Services Configuration Wizard walks through these pages:

  1. Select Promote this server to a domain controller (also under the flag in Server Manager).

  2. On Deployment Configuration, choose Add a new forest and enter the root domain name eu-new.lan.

  3. On Domain Controller Options, keep Domain Name System (DNS) server ticked and set the DSRM password.

  4. Continue through DNS Options, Additional Options (the NetBIOS name, EU-NEW) and Paths.

  5. On Review Options, check your choices. View script shows the matching PowerShell.

  6. When the Prerequisites Check passes, select Install. The server restarts on its own.

Server Manager notification offering to promote the server to a domain controllerActive Directory Domain Services Configuration Wizard, Deployment Configuration pageDeployment Configuration with Add a new forest and root domain name eu-new.lan

Choose Add a new forest because this is the first domain controller. The forest is created with eu-new.lan as its root domain.

Domain Controller Options page with DNS server selected and the DSRM password fields

The DSRM password lets you start the domain controller in Directory Services Restore Mode to repair or restore Active Directory. Make it unique and store it in your password manager: you rarely need it, and you need it badly when you do.

Configuration Wizard, DNS Options page for the eu-new.lan forestConfiguration Wizard, Additional Options page with the NetBIOS domain nameConfiguration Wizard, Paths page for the AD DS database, log files and SYSVOLConfiguration Wizard, Review Options page summarising the new forestConfiguration Wizard, Prerequisites Check page before installing the domain controller

If the DNS Options page warns that a DNS delegation can’t be created, that is expected for a new forest like eu-new.lan: there is no parent zone to update, and Microsoft’s guide notes the delegation option isn’t available when the parent zone can’t be reached.

After the restart, the server is the domain controller and DNS server for eu-new.lan. In PowerShell, Install-ADDSForest does the same; it installs DNS by default and prompts for the DSRM password. Test-ADDSForestInstallation with the same parameters runs only the prerequisite checks:

Test-ADDSForestInstallation -DomainName "eu-new.lan" -DomainNetbiosName "EU-NEW" -InstallDns
Install-ADDSForest -DomainName "eu-new.lan" -DomainNetbiosName "EU-NEW" -InstallDns

Step 4: Join a Windows client to the domain

A client can join only if it can find the domain controller, and it finds it through DNS. Set the client’s DNS server to the domain controller first, then join.

  1. On wks-1, set the IPv4 address to 172.16.10.101 and the preferred DNS server to 172.16.10.10.

  2. Open System Properties → Computer Name → Change.

  3. Under Member of, choose Domain and enter eu-new.lan.

  4. Enter the credentials of a domain account allowed to join computers, such as the domain Administrator.

  5. Confirm the welcome message and restart.

IPv4 properties on wks-1 with DNS server 172.16.10.10Windows 10 System Properties, Computer Name tab on wks-1Computer Name/Domain Changes dialog with the domain eu-new.lan enteredWindows Security prompt for domain credentials to join eu-new.lanMessage welcoming wks-1 to the eu-new.lan domain

wks-1 is now a member of eu-new.lan, and it sends sign-ins to the domain controller. The same steps work in PowerShell (Microsoft’s domain-join guide):

Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 172.16.10.10
Add-Computer -DomainName "eu-new.lan" -Credential (Get-Credential) -Restart

After the restart, sign in with a domain account. Whether your company has 10 computers or 100, each person uses the same account on every computer joined to the domain:

Windows sign-in on wks-1 with an eu-new.lan domain accountDomain user signed in on the joined client wks-1

Common mistakes when installing Active Directory

In msmtech’s Windows network projects, failed setups usually trace back to one of these:

  • The client’s DNS points at the router. The join fails because the client can’t locate a domain controller. Check with ipconfig /all that the only DNS server is the domain controller.

  • Promoting before naming. Set the computer name and IP first; changing them on a domain controller is extra work.

  • An unregistered forest name in production. .local and .lan work in a lab but can clash later. Use a subdomain of a domain you own.

  • One domain controller only. For a real office, add a second domain controller so sign-ins and DNS keep working when one is down.

With the domain running, the next steps are Group Policy for company-wide settings and the DNS records for your other machines. For the accounts and devices side, see our checklist for securing remote work.

Frequently asked questions

Do I need a separate DNS server for Active Directory?

No. Active Directory needs DNS, but the promotion wizard and Install-ADDSForest install the DNS Server role on the domain controller by default and create the domain’s zone in Active Directory. Our Windows Server DNS guide shows how to add records to it.

What is the difference between Active Directory and a domain controller?

Active Directory is the directory: the database of users, computers and policies. A domain controller is a server that runs AD DS and holds a copy of that database. A domain can have several domain controllers, which replicate changes to each other.

How many domain controllers does a small business need?

Two is the practical minimum for a production network. With a single domain controller, a hardware failure or a bad update leaves the domain without DNS, and staff can’t sign in to computers they haven’t used before, until the server is repaired or restored.

Need help with Active Directory or a Windows Server rollout? Talk to msmtech.