Recently I was tasked with configuring a Windows 2012 server Core as a domain controller from scratch. The process is well documented and fairly painless. I figured I would aggregate and post the process.
Assumptions:
- This process doesn't cover the basic installation of the OS. This assumes you have installed the OS for the first time as CORE and you are logged in for the first time with administrative credentials.
- We don't use IPv6 (yet). I lilke to unbind and disable the adapters and protocol needed for IPv6. If you use IP6 don't follow this guide.
- You already have an existing domain infrastructure. This process adds an additional domain controller to an existing domain.
- In my example the domain is called LAB.LOCAL.
- You will be installing DNS on the domain controller.
- You don't wish to change the default NTDS and SYSVOL locations.
- You understand what the directory services restore mode password is.
In this process we will:
- disable unneeded adapters
- disable "IP Helper" service (iphlpsvc)
- rename computer
- set IP/DNS addresses
- install AD
disable 6to4, isatap adapter, Teredo tunnel adapter
From the command line:
netsh int ipv6 isatap
set state disabled
netsh int ipv6 6to4 set state disabled
netsh interface teredo set state disable
disable IP Helper service
sc config iphlpsvc start= disabled
(there is a space between = and disabled)
Start Powershell
powershell
unbind IPv6
Get-NetAdapterBinding -InterfaceAlias Ethernet | Select-Object Name,DisplayName,ComponentID
Pay attention to the name displayed for the adapter you intend to modify. Petri insider’s tip: In a fresh Server core installation with one network adapter installed, the name will be Ethernet by default.
Disable-NetAdapterBinding -InterfaceAlias Ethernet -ComponentID ms_tcpip6
Get-NetAdapter
Set IP Address
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.10 -DefaultGateway 10.0.0.1 -PrefixLength 24
(if you mess up the IP address)
remove-netipaddress -ipaddress x.x.x.x -defaultgateway x.x.x.x
Set DNS address
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddress 10.0.0.100
*make sure everything looks right
ipconfig /all
Rename Computer
Rename-Computer -NewName NewComputerNAME
Reboot
(even though this is a command line command, it will work within powershell)
shutdown /r /t 1
Log back in, start PowerShell, Add computer to domain
Add-Computer -DomainName domain.local -DomainCredential (Get-Credential)
Reboot
Install AD
*log back in with (administrative) domain credentials, start powershell
Install-ADDSDomainController -DomainName lab.local -InstallDNS:$True –Credential (Get-Credential)
netsh interface teredo set state disable
disable IP Helper service
sc config iphlpsvc start= disabled
(there is a space between = and disabled)
Start Powershell
powershell
unbind IPv6
Get-NetAdapterBinding -InterfaceAlias Ethernet | Select-Object Name,DisplayName,ComponentID
Pay attention to the name displayed for the adapter you intend to modify. Petri insider’s tip: In a fresh Server core installation with one network adapter installed, the name will be Ethernet by default.
Disable-NetAdapterBinding -InterfaceAlias Ethernet -ComponentID ms_tcpip6
Get-NetAdapter
For the next few steps I want to mention that you could alternatively use sconfig to rename the computer and set the IP + DNS address.
To start sconfig just type "sconfig" at the command line.
To start sconfig just type "sconfig" at the command line.
Set IP Address
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.10 -DefaultGateway 10.0.0.1 -PrefixLength 24
(if you mess up the IP address)
remove-netipaddress -ipaddress x.x.x.x -defaultgateway x.x.x.x
Set DNS address
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddress 10.0.0.100
ipconfig /all
Rename Computer
Rename-Computer -NewName NewComputerNAME
Reboot
(even though this is a command line command, it will work within powershell)
shutdown /r /t 1
Log back in, start PowerShell, Add computer to domain
Add-Computer -DomainName domain.local -DomainCredential (Get-Credential)
shutdown /r /t 1
Install AD
*log back in with (administrative) domain credentials, start powershell
Install-WindowsFeature AD-Domain-Services –IncludeManagementTools
(wait a few minutes)
You will be asked for a SafeModeAdministratorPassword. This is the Directory Services Restore Mode Password.
"the target server will be configured as a domain controller..."
"the target server will be configured as a domain controller..."
continue with this operation? Y
(a series of warnings)
The first warning lets you know that Windows Server 2012 has defaults for certain security settings that can affect very old OSes on the network such as Windows NT 4.0. The second warns that a DNS Server delegation can’t be created. Since we’re installing DNS on this server as part of the DC promotion process, both of these errors are safe to ignore.
Reboot when complete
Credit to:
Petri, setup domain controller
http://www.petri.com/setup-domain-controller-windows-2012-server-core.htm
Petri, setup domain controller
http://www.petri.com/setup-domain-controller-windows-2012-server-core.htm
set and remove IP address from powershell:
https://technet.microsoft.com/en-us/library/hh826150.aspx
Quick Reference for server core tasks
https://technet.microsoft.com/en-us/library/jj592694.aspx
Quick Reference for server core tasks
https://technet.microsoft.com/en-us/library/jj592694.aspx