ActiveDirectory

Yes, you can install Essentials 2012 R2 (and probably other versions) with any domain suffix, not just the “.local” that the Essentials Configuration Wizard (ECW) will default to..

After the preinstall of your OS, on an Essentials SKU box, you will be launched directly into the ECW. You can close it, or ignore it. It will come back. If you are deploying the Essentials Role, just follow these steps before you install the role.

First thing, you will probably want to rename your Server, via the system properties.

Now, open Server Manager. Wait for the inventory check to complete and hit  Manage then Add Roles and Features.

We are going to just add Active Directory Domain Services at this point, select that and accept the defaults on the popup regarding features and admin tools.

Click next and accept all the defaults.

The install should take a few minutes depending on the speed of your server but my VM is pretty low spec and didn’t take long.

Once that’s installed we can run the Post Deployment task, still ignore the Essentials task at this point.

Click on Promote this Server to a Domain Controller.

The first step, is an important one.

Select ‘a new forest’ and choose a name.

There is a minefield of information out there about the right domain name to choose, some prefer a generic name, some insist on using the same name as your public name.

I am going to choose a sub domain of my public domain name.

You can accept the defaults on the rest of the wizard, unless you need to make changes to suit your environment. Chances are, you don’t. If you are not sure – ask before continuing!

You can review your settings, it is your last chance to change them and then when you are ready hit next.

Some pre-requisite checks will be run, barring any major errors (which are unlikely) you can go ahead and hit install.

Go and have a beer. That’s what I’m doing.

Of course when you come back you may be confused (depending on how many beers you consumed) to see your Server has rebooted itself.

You can now login as the domain admin. and as explained earlier the ECW will kick off again.

Now, before you continue with the Essentials setup you might want to do some other configuration.

 

Enable DNS Scavenging.

This is a really useful and often overlooked configuration change, and so easy with PowerShell.

Load up an Elevated PowerShell window..

$ipv4 = (Get-NetIPAddress -AddressFamily IPv4 | select *)

$ipA = $ipv4[0].IPAddress

$sMask = $ipv4[0].PrefixLength

$ipNet = $ipv4.IPAddress[0].Split(".")

$ipNet = $ipNet[0] + "." + $ipNet[1] + "." + $ipNet[2] + ".0"

$sNet = $ipNet + "/" + $sMask

Set-DnsServerScavenging -ScavengingState $true -ApplyonAllZones -ScavengingInterval "7.00:00:00"

Add-DnsServerPrimaryZone -NetworkID $sNet -ReplicationScope "Forest"

Install DHCP?

(You may get a warning if your server is still on a dynamic IP)

Save this as a ps1 file (don’t forget your PowerShell Execution Policy)

Write-Output "Detecting Network Settings.."

$server = $env:ComputerName

$domain = $env:UserDnsDomain

$domainName = $env:UserDomain

$serverDomain = $server + "." + $domain

$ipv4 = (Get-NetIPAddress -AddressFamily IPv4 | select *)

$ipA = $ipv4[0].IPAddress

$ipNet = $ipv4.IPAddress[0].Split(".")

$ipNet = $ipNet[0] + "." + $ipNet[1] + "." + $ipNet[2] + ".0"

$ipRouter = ((Get-NetIPConfiguration -InterfaceIndex ($ipv4[0].ifIndex) ).IPv4DefaultGateWay).NextHop

$dhcp = Get-WindowsFeature | where { $_.Name -match "DHCP" }

Write-Output "Installing DHCP.."

Add-WindowsFeature $dhcp -IncludeManagementTools

$dhcpStart = Read-Host -Prompt "Enter Start IP Of DHCP Scope"

$dhcpEnd = Read-Host -Prompt "Enter End IP Of DHCP Scope"

$exclusions = Read-Host -Prompt "Add Exclusions? Y/N"

$scopeName = "$domainName DHCP Scope"

Write-Output "Configuring DHCP.."

Add-DhcpServerInDC -DnsName $serverDomain -IPAddress $ipA

Add-DhcpServerv4Scope -Name $scopeName -StartRange $dhcpStart -EndRange $dhcpEnd -SubnetMask "255.255.255.0"

$scopeID = (Get-DHCPServerv4Scope).ScopeID

if (($exclusions) -eq "y")

{

$dhcpEclStart = Read-Host "Exclusion Start IP?"

$dhcpEclEnd = Read-Host "Exclusion End IP?"

Add-DhcpServerv4ExclusionRange -ScopeId $scopeID -StartRange $dhcpEclStart -EndRange $dhcpEclEnd

}

Set-DHCPServerv4OptionValue -ComputerName $serverDomain -dnsServer $ipA -dnsDomain $domain -Router $ipRouter

Set-DhcpServerv4DnsSetting -ComputerName $serverDomain -DynamicUpdates Always -DeleteDnsRROnLeaseExpiry $true

$username = $env:USERNAME

$username = "$domainName\$userName"

$pwd = Read-Host -AsSecureString -Prompt "Enter Password for $username"

$cred = New-Object System.Management.Automation.PSCredential($username,$pwd)

Set-DHCPServerDNSCredential $cred

Set-DHCPServerSetting -ConflictDetectionAttempts 2

Write-Output "DHCP Configured"

With any luck that will run without errors, it does for me but hey its Saturday night and I’ve been drinking.

Finish Essentials Wizard

Now we can finish our ECW.

If you did choose to install DHCP you may want to disable the DNS Configuration of Essentials Clients before installing the connector. You can use my script here to do this.