Install Active Directory on Amazon EC2 Windows Server
Link to YouTube video : Install Active Directory on Amazon EC2 Windows Server
- Create VPC with two public and two private subnets.
- Launch Bastion Host Instance in Public Subnet.
- Launch DC01 in private subnet and configure as primary domain controller for the domain. In this demo, the domain name is "corp.local".
- Launch DC02 in the other private subnet for high availability and configure as additional (second) domain controller for the domain.
- Run Powershell commands to verify the installation.
- Login to DC01 & DC02 as Domain Administrator.
Rename Computer
Rename-Computer -NewName "<newName>" -Restart
Install Active Directory Domain Services Windows Feature along with its Management tools
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Verify Active Directory Domain Service Windows Feature installation
Get-WindowsFeature -Name AD-Domain-Services
Configure an Active Directory Forest & Install Domain Name Service(DNS) Server Service.
$domainName = "<domainName>"
Install-ADDSForest -DomainName $domainName -InstallDNS
Set the primary and secondary DNS Server IPs on the Ethernet Adapter
Set-DnsClientServerAddress -InterfaceIndex <InterfaceIndex> -ServerAddresses ("<DC01 IP>", "<DC02 IP>")
Install Active Directory Domain Services Windows Feature along with its Management tools
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Verify Active Directory Domain Service Windows Feature installation
Get-WindowsFeature -Name AD-Domain-Services
Get Interface Index for Ethernet adapter (Elastic Network Adapter)
Get-NetIPInterface
Set the primary DNS Server IP on the Ethernet Adapter
Set-DnsClientServerAddress -InterfaceIndex <InterfaceIndex> -ServerAddresses ("<DC01 IP>")
Add an additional Domain Controller for the domain
$domainName = "<domainName>"
$domainUser = "<domainNetBIOSName\domainAdministratorUserName>"
$HashArguments = @{
Credential = (Get-Credential $domainUser)
DomainName = $domainName
InstallDns = $true
}
Install-ADDSDomainController @HashArguments
Set the primary and secondary DNS Server IPs on the Ethernet Adapter
Set-DnsClientServerAddress -InterfaceIndex <InterfaceIndex> -ServerAddresses ("<DC02 IP>", "<DC01 IP>")