Installing Active Directory on Windows Server 2016

🛠️Part of the Windows Administration Complete Guide, every Windows administration post on this site, grouped by the job you are doing.

To install Active Directory on Windows Server 2016, give the server a static IP address and its final name, add the Active Directory Domain Services role in Server Manager, then promote the server to a domain controller in a new forest. The promotion wizard installs DNS alongside it and restarts the server when it is done. The same two steps in PowerShell are further down.

This is part of my 2019 home lab series. The server was built in my previous post, Installing Windows Server 2016 with Hyper-V, and the next post, Joining a Windows Host to a Domain, adds a second VM to the domain created here.

Microsoft’s own walkthrough is Install Active Directory Domain Services on Microsoft Learn.

The following steps will get your test Windows Server environment set up to run Active Directory:
# Create a Hyper-V Private Network.
# Configure Windows TCP/IP Settings.
# Rename the Windows Server Host.
# Install Active Directory.
# Promote the Server to a Domain Controller.
# Do the Same With PowerShell.
# What Is Different on Windows Server 2022 and 2025.
Once the above has been achieved, you can create a new VM in Hyper-V (or other Hypervisor) and join your Domain, as I’ve done for some tests.

Create a Hyper-V Private Network

1. Right-click the Hyper-V host and select Virtual Switch Manager.

Hyper V Virtual Switch Manager

2. Select Private and Create Virtual Switch.

Hyper-V VSwitch Manager New Private Switch

3. Enter a name for the network and click okay.

HyperV vSwitch Manager

4. Right-click the VM in Hyper-V and click Settings.

HyperV VM Settings

5. Add a new Network Adapter.

HyperV Add New Network Adapter

6. Select Private vSwitch as named above and click OK.

HyperV Add New Network Adapter

Configure Windows TCP/IP Settings

1. When the above has been set-up, Windows Server will show network settings as Identifying…

Windows Server Identifying Network

2. Right-click the network icon and click Open Network and Sharing Center.

Windows Network and Sharing Center

3. Click the highlighted active Ethernet connection.

Windows Server Network and Sharing Center

4. Open Properties.

Windows Ethernet Adapter

5. Open Internet Protocol Version 4 (TCP/IPv4) Properties.

Ethernet Adapter IPv4 Properties

6. Enter a static IP address and subnet mask. A domain controller needs an address that does not change, because every machine that joins the domain will use it as its DNS server.

Windows Ethernet Adapter IPv4 Address

Rename the Windows Server Host

1. Open Server Manager and click the highlighted Computer Name.

Windows Server Manager Host Info

2. Click Change…

Windows System Properties

3. Enter new Computer Name and click OK.

Windows Server Computer Rename

The host will require a reboot once done.

Installing Active Directory

1. Within Server Manager, click Manage > Add Roles and Features.

Windows Server Manager Add Roles and Features

2. Before you begin, read the before you begin.

Server Manager Add Roles and Features

3. Select Role or Feature-based installation.

Server Manager Add Roles and Features Installation Type

4. Select the destination server.  

Server Manager Add Roles and Features Destination Server

5. Tick the Active Directory Domain Services checkbox.

Server Manager Add Roles

6. The following will appear – click to add the additional tools.

Server Manager Add Roles Active Directory

7. No features are being added at this time – click to continue.

Server Manager Add Features

8. ADDS page is worth a read – nothing to change here.

Server Manager AD DS

9. Review and click to install.

Server Manager Roles and Features Installation

10. Leave it a few minutes and we’re then able to promote this server as a new Domain Controller.

Server Manager Active Directory Installation

Promote the Server to a Domain Controller

1. Once done with the above, there won’t be a finish point within the wizard. Click the flag on Server Manager to Promote the server to a Domain Controller.

Active Directory Promote to DC

2. This is a new test environment, so I need to Add a new forest. For a lab any name will do. For anything real, Microsoft’s advice is a name that is not used for your public DNS, such as corp.example.com rather than example.com, and never a single-label name like example.

Active Directory Domain Services Config Wizard

3. A new forest means the forest and domain functional levels can be the highest available, which on Windows Server 2016 is Windows Server 2016. Leave DNS server ticked: the first domain controller in a forest should run DNS for the domain, and it has to be a Global Catalog anyway. This is also where you set the Directory Services Restore Mode (DSRM) password. You need it to sign in to the domain controller when AD DS is not running, for example to restore Active Directory, so make it strong and keep it somewhere safe.

Active Directory Domain Controller Options on Install

4. The DNS Options page warns that a delegation for this DNS server cannot be created. That is expected when you create a new forest with no parent zone on a Windows DNS server, as here, and you can carry on. Microsoft’s DNS Options page says the delegation can be created before or after the install, and there is no reason to delay a new domain controller over it.

Active Directory Domain DNS Options

5. Enter a preferred NetBIOS name. The wizard fills one in from the first part of the domain name, and it has to be 15 characters or fewer.

Active Directory Configuration Additional Options

6. Locations can stay as defaults of course.

Active Directory Installation Paths

7. Time for us to review wizard selections.

Active Directory Installation Review

8. As you’ll see in the image above, we can click to view the PowerShell script that is about to run with the wizard selections included.

Active Directory Installation Script

This is the script the wizard generated for my lab forest. WinThreshold is the PowerShell name for the Windows Server 2016 functional level:

PowerShell
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainName "whyte.net" `
-DomainNetbiosName "WHYTE" `
-ForestMode "WinThreshold" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

9. A prerequisites check will run as we hit next from above. 

Active Directory Installation Prerequisites

10. Click to install…

Active Directory Installation Progress

11. An automatic reboot will be initiated at the end.

Windows Reboot

12. When back up and running, we can log in to the new domain.

Windows Server Domain Login

13. And have a look at our Active Directory Users & Computers, just for the fun demo of course.

dsa.msc
Active Directory Users and Computers

Do the Same With PowerShell

The whole install is two commands from an elevated PowerShell prompt. The first adds the role and its management tools. The second creates the forest, installs DNS and prompts you for the DSRM password. Test-ADDSForestInstallation runs the same prerequisite checks first without changing anything:

PowerShell
# Add the AD DS role with the management tools
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools

# Check the forest prerequisites without changing anything
Test-ADDSForestInstallation -DomainName 'corp.example.com' -InstallDns

# Create the forest (prompts for the DSRM password, restarts when done)
Install-ADDSForest -DomainName 'corp.example.com' -InstallDns

Without -NoRebootOnCompletion the server restarts at the end, the same as the wizard. Microsoft’s Install-ADDSForest page also notes that the first domain controller in a forest gets 127.0.0.1 as its preferred DNS server, so do not be surprised to see the address you set earlier replaced.

What Is Different on Windows Server 2022 and 2025

The steps above are the same on newer versions. Microsoft’s current guide still goes Add Roles and Features, then Promote this server to a domain controller, then the same wizard pages. What changes is the functional level list:

  • Windows Server 2019 and 2022 have no functional level of their own. Windows Server 2016 is still the highest you can pick.
  • Windows Server 2025 adds a Windows Server 2025 functional level. Only Windows Server 2025 domain controllers can run at it, and it unlocks the optional 32k database page feature.
  • A Windows Server 2025 domain controller needs the domain and forest at the Windows Server 2016 level or higher, so a forest built as in this post can take one.

Microsoft’s advice has not changed: set the forest and domain functional levels to the highest value that every domain controller in your environment supports. The full matrix is on Active Directory Domain Services functional levels.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *