Setup LAB: 02 Install & Configure a Domain Controller


In the previous post, I had installed Windows Server 2012 evaluation on a virtual machine & added Dot Net Framework 3.5. In this post, let’s start with the domain controller installation from a copy of the pre-installed VHD. I had created a VM from the copy of the VHD file, which I created earlier. I have attached a network adapter to the virtual machine & assign it the IP address 192.168.101.11/24 (with Subnet mask as 255.255.255.0).

Install the Active Directory Domain Services

We can use Add Roles and Features option from Server Manager to add Active Directory Domain Services on this server; however, to simplify the installation process, I am going to use the Windows PowerShell script to complete this installation. This script can be generated as part of AD DS deployment using Add Roles and Features tool.

Right-click on the PowerShell icon, and select Run ISE as Administrator to start the PowerShell ISE.

image

Copy the below script to a new script window & modify the parameters as required. Once all the required parameters are modified, execute the script by pressing the F5 button on your keyboard.

# To set the script execution as RemoteSigned
Set-ExecutionPolicy RemoteSigned
# Install the Server Role Active Directory Domain Services
Install-WindowsFeature -Name AD-Domain-Services -IncludeAllSubFeature -Restart

#
# Windows PowerShell script for AD DS Deployment
#

# Enter your Domain Name
$domainName = "SKGLAB.LOCAL"
# Enter your Domain Netbios Name
$domainNetbiosName = "SKGLAB"

# Domain Functional Level
$domainMode = "Win2012"
# Forest Functional Level
$forestMode = "Win2012"

# Location of AD database file
$databasePath = "C:\Windows\NTDS"
# Location of Log file
$logPath = "C:\Windows\NTDS"
# Location of SysVol
$sysvolPath = "C:\Windows\SYSVOL"

Import-Module ADDSDeployment

Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath $dbLocation `
-DomainMode $domainMode -DomainName $domainName -DomainNetbiosName $domainNetbiosName `
-ForestMode $forestMode -InstallDns:$true -LogPath $logPath -NoRebootOnCompletion:$false `
-SysvolPath $sysvolPath -Force:$true

Once the script is executed, you will prompted to provide the recovery password. The installation will continue & you may see the below screen during the installation.

image

The server will restart to complete the directory service installation. Once the server is back online, login to the server to configure the DNS server.

Configure the DNS Server

Once the domain controller is installed, we need to configure the DNS server. Open Server Manager & start DNS Manager from the drop down list of tools. We are going to configure the Reverse LookUp Zone, which will provide the resolutions from IP Address to the respective Host name. Once the DNS Manager opens, right click on Reverse LookUp Zone tab, & select New Zone.

image

Select the zone type as Primary Zone & click Next to continue. On the Active Directory Zone Replication Scope, select the option as shown in the below screenshot.

image

Select IPv4 Reverse Lookup Zone from the list of Reverse Lookup Zone Name and provide the Network ID as shown in the below screenshot.

image

On the next page, select the Dynamic Update option & click on finish to complete the DNS configuration.

Create a Pointer Record

Once the reverse lookup zone is configured, let’s create a pointer record (PTR) for the domain controller. Expand the reverse lookup zone node in DNS Manager & select the newly configured zone. Right-click on the zone node & select New Pointer (PTR) as shown in the below screenshot.

image

Provide the IP Address & browse the Host Name of the domain controller, as shown in the below screenshot.

image

To check, whether the DNS server is function as required, launch nslookup as shown in the below screenshot. The utility will check the name resolution between hostname & IP address for the domain controller.

image

In the next post, we will configure the rest of the virtual machines & start with SQL Server 2012 installation.

Happy Learning 🙂 !!!

Advertisements

About Sudeepta Ganguly

A SQL Server User... Still Learning
This entry was posted in How To, PowerShell, Setup LAB, SQL2012, TestLab and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s