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=192.168.1.10 mask=255.255.255.0 gateway=192.168.1.1
Then we add our DNS servers
This should be the DNS address of your Active Directory DNS Server so replace 220.127.116.11 with that IP address.
netsh interface ipv4 set dns name="Local Area Connection" source=static address=18.104.22.168 primary
Confirm your new IP setup information
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
To check if it was really installed we can run.
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.