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.

Steps:

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 192.168.65.210 255.255.255.0 192.168.65.2 1

Set the DNS Server

>netsh interface ipv4 add dnsserver name=”Local Area Connection” address=192.168.65.2 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:

[DCINSTALL]
AutoConfigDNS=Yes
DomainNetBiosName=devdomain
NewDomainDNSName=devdomain.local
ReplicaOrNewDomain=Domain
NewDomain=Forest
ForestLevel=3
DomainLevel=3
SafeModeAdminPassword=Password1234
RebootOnSuccess=Yes

Leave a Reply

Your email address will not be published.