Share via


Windows Server 2012 Step-by-Step Guide: Configuring DC into existing windows 2008 R2 Forest/Domain with PowerShell

Goal

 

we will promote our first Windows 2012 domain controller into existing Forest/Domain by using PowerShell installation option. .Please make sure you have tested your application as this will update the schema versions.

Step 1: Install server

Install Windows 2012 Server and log in log on to server with administer privileges

Step 2: Rename server

Open PS and rename the Server

Rename-Computer ComputerName

Step 3: Disable ipv6

Disable IPV6 ( easiest way to use GUI )

PS type

ncpa.cpl

Step 4: Static IP

Configure Static IP Address ( change the IP address and SM to fit into your scenario)

New-NetIPAddress -IPAddress 10.10.10.101 -InterfaceAlias "Ethernet" -DefaultGateway 10.10.10.1 -AddressFamily IPv4 -PrefixLength 24

Step 5: DNS

Set DNS server on the TCP/IP 4 Interface

Add-Computer -DomainName ZtekZone.com

http://lh4.ggpht.com/-XgPhslIjsOM/Ua4Ts5MeMaI/AAAAAAAAFrs/Ms7xhxmNleo/s1600-h/image%25255B14%25255D.png

Step 6: reboot

You will need to reboot the Server at this point since we re-named the server

ShutDown –r –t 3

After reboot add the server into existing domain

Step 7: add to domain

Add-Computer –DomainName ZtekZone.com

Step 8: restart

ShutDown –r –t 3

Log back into the server, now server has been added to existing domain , A record for this server has been registered into DNS database, this is just cleaner way of getting ready to promote the server to be the domain controller.

Step 9: Add domain services

Get-windowsfeature AD-Domain-Services

install-windowsfeature –Name AD-Domain-Services

Now on the Server C ( root) make folder called scripts and change the directory to there , you need to place the install script

In this directory and below is sample script. You can customize the PS script to fit into your scenario.

Save the script as PS script , give it any name you like, I named this one as…….

“Install_Win2012_domain_Controller.ps1”

Step 10: install script

# You also make sure the site name is correct based on your scenario

# You can change .dit & sysvol, and logs locations based on your install preference

# Credits goes to blogs.technet.com/b/askpfeplat/

# archive/2012/09/06/introducing-the-first-windows-server-2012-domain-controller-part-2-of-2.aspx

Import-Module ADDSDeployment

Install-ADDSDomainController `

-NoGlobalCatalog:$false `

-CreateDnsDelegation:$false `

-CriticalReplicationOnly:$false `

-DatabasePath "C:\Windows\NTDS" `

-DomainName "ZtekZone.com" `

-InstallDns:$true `

-LogPath "C:\Windows\NTDS" `

-NoRebootOnCompletion:$false `

-SiteName "Site-1" `

-SysvolPath "C:\Windows\SYSVOL" `

-Force:$true

# End

Step 11 exec policy

Check the execution policy and set it to Remote sign

Set-ExecutionPolicy RemoteSigned –Force

Step 12: run script

Now it is time to run the script

Install_Win2012_domain_Controller.ps1

Updating Schema

Server will reboot at this point log back in and open site and services

Here is the full article on my Blog 

http://smtp25.blogspot.com/2013/06/step-by-step-guide-for-configuring.html