Windows 2008 Core Read Only Domain Controller Script

1. Enter the productkey:
slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

2. Activate:
slmgr.vbs -ato

3. Show activation:
slmgr.vbs -dli

4. Rename the computer:
Netdom renamecomputer WIN-???????? /newname:W2K8RDC01 /reboot:15
(use the command set to all the variables used by )

5. Show all network interfaces:
Netsh interface ipv4 show interface

6. Set a static IP address:
Netsh interface ipv4 set address name=2 source=static address=xxx.xxx.xxx.xxx mask=255.255.255.0 gateway=xxx.xxx.xxx.xxx
(make sure that you’re choosing the right network interface. In this example it’s 2, so name=2 it means interface 2)

7. Set a static DNS server:
Netsh interface ipv4 add dnsserver name=2 address=xxx.xxx.xxx.xxx index=1

8. Turn Remote Desktop (RDP) on:
Cscript %windir%system32SCRegEdit.wsf /ar 0

9. Enable Remote Desktop (RDP) in the Windows Firewall:
netsh advfirewall firewall set rule group=”remote desktop” new enable=yes

10. Enable Remote Management (RemoteCMD) in the Windows Firewall:
netsh firewall set service type=remoteadmin mode=enable 

11. Join the domain:
Netdom join W2K8RDC01 /domain:adtest.local /usero:administrator /passwordo:*
(This step is only for joining a member server to the domain. For a Domain Controller go to step 12)

12. Preparing the promotion to a Read Only Domain Controller:
We need to create a unattend.txt that we are going to use by the DCPROMO. So let’s create a new textfile, type notepad

13. Making the unattended.txt:
Copy and past the following test into the new textfile and save this file on the C: drive of the Server.

==================================================
[DCInstall]
InstallDNS=Yes
ConfirmGc=Yes
CriticalReplicationOnly=No
DisableCancelForDnsInstall=No
RebootOnCompletion=Yes
ReplicaDomainDNSName=adtest.local
ReplicaOrNewDomain=ReadOnlyReplica
ReplicationSourceDC=win2k8dc01.adtest.local
SafeModeAdminPassword=******************
SiteName=Default-First-Site-Name
UserDomain=adtest.local
UserName=administrator
Password=******************
RebootOnCompletion=Yes
==================================================
14) Run the DCPROMO
dcpromo /unattend:c:unattend.txt

Leave a Reply