Active Directory
Add a second domain controller for reliability
Keep logins working when a server fails, by running a second copy of your directory.
- PrepareServer joins domain
- InstallAdd the role
- PromoteSecond controller
- VerifyCheck replication
What you need
- A second Windows Server, ideally on separate hardware
- A working first domain controller
- An account with Domain Admin rights
Prepare the second server
Set a fixed IP address, point its DNS at the first domain controller, rename it, and join it to the domain. Use the commands from the earlier tutorials, changing the name and address.
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.10.11 -PrefixLength 24 -DefaultGateway 192.168.10.1 Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 192.168.10.10 Add-Computer -NewName "DC02" -DomainName "corp.example.com" -Credential "CORP\Administrator" -RestartInstall the role and promote the server
This copies the directory from the existing domain controller and installs DNS. The server restarts when it finishes.
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools Install-ADDSDomainController ` -DomainName "corp.example.com" ` -InstallDns ` -Credential (Get-Credential "CORP\Administrator") ` -SafeModeAdministratorPassword (Read-Host -AsSecureString "DSRM password")Check that the two servers replicate
Run these on either domain controller. Investigate any failures before you rely on the second server. As a simple test, create a user on one and check it appears on the other.
repadmin /replsummary repadmin /showrepl dcdiag /qTell computers to use both DNS servers
Add both addresses as DNS servers for computers on the network, usually through your DHCP settings. If computers only know about one server, they may not find the domain when it is down.
Test a failure, and keep your backups
During a quiet time, shut down the first server and check that users can still sign in. Keep backing up the directory, because a second domain controller also replicates mistakes and deletions.
Avoid restoring a domain controller from an old virtual machine snapshot unless you have checked the supported recovery process.
Want this set up for your business?
We can plan, build and hand it over to your team.