Active Directory on Windows Server Core

Just a quick post on how-to install Active Directory on Windows Server Core 2019. Once in a while I just rebuild my whole development environment including my Windows Server Core virtual machines. Rebuilding a domain controller on Windows Server Core is pretty easy, but requires just a few steps you’ll have to take one after another.


Install Windows Server

Install your copy of Windows Server like you would normally do. Select your language and keyboard preferences, configure the hard drive and wait for the installation to complete.

Lastly, when logging in for the first time, set a password for the Administrator account.

Rename the computer

Log in to your new Windows Server 2019 Core instance, launch a PowerShell console and rename the computer to whatever you desire.

Rename-Computer -NewName SRV-DomainController

Don’t reboot yet. First we set a static IP address and DNS server to make sure we don’t forget that.

# Get all network adapters

# Set IP address and DNS
$ip = ""
$dns = ""
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress $ip -AddressFamily IPv4 -PrefixLength 24
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses $dns

Set the correct timezone

Since I’m living in The Netherlands, my timezone will be W. Europe Standard Time.

Set-TimeZone -Id "W. Europe Standard Time"

Now reboot the server with shutdown -r -t 0!

Install the Active Directory Domain Services

Install the Active Directory Domain Services (ADDS) and make sure you will include the management tools. You also might receive a few warning about DNS and security tokens. You can safely ignore that.

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools

With ADDS installed, create your first domain forest and give it a proper name. Choose wisely, because you won’t be able to change it with ease.

Install-ADDSForest -DomainName techblog.local
provide safe mode password active directory
Provide your domain name and choose a Safe Mode password

Choose a password for the safe mode administrator. If you need to recover the domain when nobody else is able to, you would still have this password. After setting the password, the server would like to reboot to complete the setup.

sign out from windows server
Windows will sign you out to finish installing ADDS

Validate your new domain controller

Yes! Welcome to your new domain. A fresh and new Active Directory on Windows Server Core. Now we will verify a few things to make sure that everything is setup correctly.

 Get-Service adws,kdc,netlogon,dns

Check in the Event Viewer if logs can be retrieved for ADDS.

Get-Eventlog "Directory Service" | Select-Object entrytype, source, eventid, message
Get-Eventlog "Active Directory Web Services" | Select-Object entrytype, source, eventid, message

PowerShell DSC

Even want to do it a bit faster? You could also use PowerShell Desired State Configuration to setup a new domain controller. More information on that can be found on this website.

Do you have any questions? Don’t hesitate to leave a comment or send me a message.

4 thoughts on “Active Directory on Windows Server Core

Leave a Reply

Your email address will not be published.