How-to Setup Windows 2008 R2 Server Core As An Active Directory Server

On April 7, 2011, in How-to, by Cubert aka (Cube Dweller)

Setup Active Directory on a Windows Server 2008 core


This is pretty simple actually; Install Windows as normal but selecting a Server Core as your installation medium. It will install just like a normal Windows 2008 install until the reboot process when it loads Windows for the first time. At the point it will ask for you to set your admin password and then boot to a Window’ish desktop where only a Command shell is available.

At first log in there are several things we need to do to prepare the system.


We need to assign the server a hostname

netdom renamecomputer %computername% /newname:YourServerName

Then we add our network information

netsh interface ipv4 set address name="Local Area Connection" source=static address= mask= gateway=

Then we add our DNS servers

This should be the DNS address of your Active Directory DNS Server so replace with that IP address.
netsh interface ipv4 set dns name="Local Area Connection" source=static address= primary

Confirm your new IP setup information

ipconfig /all

Now lets restart the system

shutdown -r -t 0

After we log back in from our reboot we join the existing domain

netdom join %computername% /domain:YourDomainName.

You notice I have a “.” at the end of the line! the denotes the end of the domain name and should be used.

Lets restart the server and bring it up as a member of the domain

shutdown -r -t 0

We should go ahead and activate Windows 2008 R2 now.

 cscript C:\windows\system32\slmgr.vbs -ato

Now we need to add the DNS-Server-Core-Role

ocsetup DNS-Server-Core-Role

To check if it was really installed we can run.

oclist |more

Now we dcpromo the server in the unattended mode

dcpromo /unattend /replicaOrNewDomain:replica /replicaDomainDNSNAME:YourDomainName  /ConfirmGC:Yes /UserName:YourDomainName\Administrator /Password:* /safeModeAdminPassword:YourPasswordHere

The (/Password:*) tells the Server to ask you it during the request to add after you run the command. The (/safeModeAdminPassword) sets what you want the local admin password to be if you need to log in “off” the domain.

The AD DS role will be installed and afterwords the server will reboot as a domain controller.


Now to make your job easier lets turn on Remote Desktop so you can RDP to the Windows 2008 Server Core and operate the command shell from remote.

cscript c:\windows\system32\scregedit.wsf /AR 0

I hope this helps someone out there get a Windows 2008 Server Core up and running as a Active Directory Server quickly.



5 Responses to “How-to Setup Windows 2008 R2 Server Core As An Active Directory Server”

  1. aboyd says:

    Whoo hoo; Have my first core server running!!!

  2. Bridger says:

    This was great! Thank you!

  3. Har! says:

    How to create AD users in this?

  4. buzzd says:

    Great HowTo. Good Job. Thanks a lot.

  5. Cubert says:

    You will need to download and install AD tools on Windows & or use another server and point ADUC at core server. It will then allow you to manage AD from remote.

Leave a Reply


%d bloggers like this: