Windows Server Core as a domain controller

Windows Server Core as a domain controller

This post will describe the steps for setting up a Windows Server Core as a domain controller for an Active Directory (AD) domain. Why would you do that? Well, first and foremost, it’s very useful for a developer to have a dedicated AD Domain Controller running on Windows Server Core since it’s a much smaller and leaner operating system then the full blown Windows Server product. You’ll most likely also run your domain controller in a virtual environment such as Hyper-V or VMWare and Windows Core is much less demanding on your resources, let alone more secure since it has a much smaller attack surface area.


Install Windows Server Core

Rename the computer

First determine the current computer name. The easiest way to do this is to type SET and copy the COMPUTERNAME value.

>netdom renamecomputer <CurrentComputerName> /NewName:<YourNewName>

Set the IP address to a static address

>netsh int ip set address “Local Area Connection” static 1

Set the DNS Server

>netsh interface ipv4 add dnsserver name=”Local Area Connection” address= index=1

Install the DNS Role

>start /w ocsetup DNS-Server-Core-Role

Create the new Domain

>dcpromo /unattend:c:\unattend.txt

Checking if Active Directory Domain Services binaries are installed…
Active Directory Domain Services binaries are being installed. Please wait…
And then it will continue setting up your domain and automatically reboot.

Unattend.txt sample: