Most Popular Posts

Monday 2 January 2012

Setting up Server core

Here is an old KB I wrote on how to setup server core 2008 from scratch, might be useful to someone..

This document describes how to setup a server core installation from start to finish
Guide to setting up server core 2008


1) Install server core as you would any version of windows

2) now you must set your IP address and DNS server.

3) To set your IP address type the following(omit the outer most quotes)
"netsh interface ipv4 set address name="Local Area Connection" source=static address=x.x.x.x mask=x.x.x.x gateway=x.x.x.x"

4) to set your DNS server type the following
netsh interface ipv4 add dnsserver name="local area connection" address=x.x.x.x index=1

5) you must now enter your product key by typing the following "cscript c:\windows\system32\slmgr.vbs -ipk AAAAA-BBBBB-CCCCC-DDDDD-EEEEE"

6) Now once that key is entered you need to activate it by typing
"cscript c:\windows\system32\slmgr.vbs -ato"

7) Next you have to rename the server do this by typing the following:
"netdom renamecomputer "currentname" /newname:CORESERVER"
press "Y" to the prompts and then reboot (Shutdown.exe -R)

8)now you must disable the firewall temporarily (to drop a text file on the C$ share of the servercore instance" disable the firewall as follows:
"netsh firewall set opmode disable"

9) now create a file called "unattend.txt" and drop it on the c drive of the servercore. Use the below as a template only, there is microsoft documentation on this that is very indepth. The textfile should contain the following:

[DCINSTALL]
username=administrator
Password=PASSWORD
userdomain=YOURDOMAIN.LOCAL
SafeModeAdminPassword=PASSWORD
CriticalReplicationOnly=no
SiteName=SITENAME
ReplicaOrNewDomain=Replica
ReplicaDomainDNSName=yourdomain.LOCAL
ReplicationSourceDC=otherserver.yourdomain.LOCAL
RebootOnSuccess=Yes
NOTE: If you cant get on the C$ share Run "net user administrator password" (to reset the admin password) replace "password" with your password

10) With unattend.txt on the c drive of the sever type the following:
"dcpromo /unattend:c:\unattend.txt"

11) after dcpromo has run you need to set up DNS and DHCP. To install DHCP type the following:
"start /w ocsetup DHCPServerCore"
"sc config dhcpserver start= auto"
"net start dhcpserver"

12) Now to install DNS type the following:
start /w ocsetup DNS-Server-Core-Role

13) Now all you need to do is manage these roles (AD, DNS and DHCP) using the MMC snap-ins from another computer.

14)Now to turn the firewall back on type:
"netsh firewall set opmode enable"

15) and to set 2 DNS servers (the servercore as primary and another as secondary) type the folllowing:
"netsh interface ipv4 add dnsserver name="local area connection" address=<127.0.0.1> index=1"

"netsh interface ipv4 add dnsserver name="local area connection" address= index=2"

16) now to set the correct time we need to open time and date by typing:
"timedate.cpl"
and set as you wish

17) now we need to schedule regular windows updates of our servercore box. To do this type the following:
"Cscript c:\windows\system32\scregedit.wsf /au 4"
"Net stop wuauserv"
"Net start wuauserv"

to then detect updates type "wuauclt /detect now"
18) now to allow remote administration through the firewall type:
Netsh advfirewall firewall set rule group="remote administration" new enable=yes

Hope it helps someone :)

No comments:

Post a Comment