In this tutorial we will install the Active Directory Domain Services and configure our first domain.The name of our domain is Connexus. We start this tutorial with a clean Windows Server 2012 R2 Standard Edition. Because we are only using Powershell scripts you could use a server core. If you are interested in the scripts just scroll down to the bottom.




#set static IP address
$ipaddress = ""
$ipprefix = ""
$ipgw = ""
$ipdns = ""
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
$wmi.EnableStatic($ipaddress, $ipprefix)
$wmi.SetGateways($ipgw, 1)
#rename the computer
$newname = "DC-Connexus-1"
Rename-Computer -NewName $newname -force
#install features
$featureLogPath = "c:\logs\featurelog.txt"
New-Item $featureLogPath -ItemType file -Force
$addsTools = "RSAT-AD-Tools"
Add-WindowsFeature $addsTools
Get-WindowsFeature | Where installed >> $featureLogPath
#restart the computer

Install Active Directory

#Install AD DS, DNS and GPMC
Add-WindowsFeature -Name "ad-domain-services" -IncludeAllSubFeature -IncludeManagementTools
Add-WindowsFeature -Name "dns" -IncludeAllSubFeature -IncludeManagementTools
Add-WindowsFeature -Name "gpmc" -IncludeAllSubFeature -IncludeManagementTools 

Configure our domain

# Create New Forest, add Domain Controller
$domainname = "CONNEXUS.HQ"
$netbiosName = "CONNEXUS"
Import-Module ADDSDeployment
Install-ADDSForest -CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "Win2012" `
-DomainName $domainname `
-DomainNetbiosName $netbiosName `
-ForestMode "Win2012" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `

0 reacties:

Post a Comment