Advertisement
Intermediate Time: 2–3 weeks IT & Networking

Active Directory Domain Controller

Deploy a Windows Active Directory domain controller with users, computers, Group Policy, DNS, and DHCP for enterprise network management.

Active DirectoryWindows ServerLDAPGroup PolicyDomainEnterprise IT
DifficultyIntermediate
Duration2–3 weeks
Components10 items
Steps3 steps

Introduction

Deploy a Windows Active Directory domain controller with users, computers, Group Policy, DNS, and DHCP for enterprise network management. This comprehensive guide covers everything from design through implementation, testing, and deployment.

Theory & Background

Install Windows Server 2022. Set static IP (192.168.10.10). Set hostname (DC01). Open Server Manager → Add Roles → Active Directory Domain Services (AD DS). Post-install: Promote to Domain Controller. Create new forest: root domain name catb.local (use .local for internal). Forest/Domain functional level: Windows Server 2016. Configure Directory Services Restore Mode (DSRM) password. DNS role installed automatically. After reboot: domain controller is operational.

Advertisement

Components & Requirements

10 components required for this project.

#ComponentPurposeQty
1Windows Server 2022 (VM)Primary and secondary DCx2
2Windows 10/11 client VMsDomain member workstationsx3
3Hyper-V or VMwareVirtualization hostx1
4Static IPs (via DHCP reservations)Fixed addressing for serversx1
5DNS server (built into AD DS)Name resolutionx1
6Group Policy Management ConsolePolicy administrationx1
7Active Directory Users and ComputersUser/computer managementx1
8Security Event LogAudit trail for compliancex1
9PowerShell 7Automation and bulk managementx1
10RADIUS server (optional)WiFi authentication against ADx1

Step-by-Step Implementation

Follow these 3 steps carefully.

1
Domain Controller Installation

Install Windows Server 2022. Set static IP (192.168.10.10). Set hostname (DC01). Open Server Manager → Add Roles → Active Directory Domain Services (AD DS). Post-install: Promote to Domain Controller. Create new forest: root domain name catb.local (use .local for internal). Forest/Domain functional level: Windows Server 2016. Configure Directory Services Restore Mode (DSRM) password. DNS role installed automatically. After reboot: domain controller is operational.

2
Organizational Unit and User Structure

Design OU (Organizational Unit) hierarchy: catb.local → IT, HR, Finance, Management, Computers, Servers, ServiceAccounts. Users placed in department OUs for Group Policy application. Create user accounts: Name, UPN (john.doe@catb.local), department, office, manager. Security groups: Domain_Admins (full control), IT_Staff (server access), HR_Staff (HR system access), File_Server_Read/Write (share access). Nest groups: IT_Staff → Domain_Admins for granular control.

3
Group Policy Objects (GPO)

GPOs apply settings to users and computers based on OU membership. Essential GPOs: Password Policy GPO → domain level (14 chars, complexity, 90-day expiry), Desktop Lockout (screensaver after 5 mins idle), Software Deployment (MSI packages pushed to computers), Drive Mapping (map \\fileserver\share based on group membership), Printer Mapping, Security Baseline (CIS Benchmark settings: disable unneeded services, enable auditing, configure IE/Edge). Use Resultant Set of Policy (rsop.msc) to verify applied policies.

Code & Implementation

Core code for ad_setup.ps1:

ad_setup.ps1 PowerShell
# Active Directory Setup and Configuration Script  # Install AD DS role Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools  # Promote to Domain Controller Install-ADDSForest -DomainName "catb.local" -DomainNetBIOSName "CATB" -ForestMode "WinThreshold" -DomainMode "WinThreshold" -InstallDNS -SafeModeAdministratorPassword (ConvertTo-SecureString "SecureP@ssw0rd" -AsPlainText -Force) -Force  # Create Organizational Units New-ADOrganizationalUnit -Name "IT"      -Path "DC=catb,DC=local" New-ADOrganizationalUnit -Name "HR"      -Path "DC=catb,DC=local" New-ADOrganizationalUnit -Name "Finance" -Path "DC=catb,DC=local"  # Create users in bulk from CSV Import-Csv users.csv | ForEach-Object {     New-ADUser -Name "$($_.FirstName) $($_.LastName)" \`                -GivenName $_.FirstName -Surname $_.LastName \`                -SamAccountName $_.Username \`                -UserPrincipalName "$($_.Username)@catb.local" \`                -Department $_.Department \`                -Path "OU=$($_.Department),DC=catb,DC=local" \`                -AccountPassword (ConvertTo-SecureString $_.Password -AsPlainText -Force) \`                -Enabled $true     Write-Host "Created user: $($_.Username)" }  # Create security groups New-ADGroup -Name "IT_Staff" -GroupScope Global -Path "OU=IT,DC=catb,DC=local" New-ADGroup -Name "Domain_Admins_Custom" -GroupScope Global -Path "OU=IT,DC=catb,DC=local" Add-ADGroupMember -Identity "Domain Admins" -Members "Domain_Admins_Custom"

Testing & Troubleshooting

Test Active Directory Domain Controller by verifying each subsystem individually before full integration.

!
Troubleshooting Tips

Verify power voltages, check ground connections, use serial monitor for debug.

Real-World Applications

*Enterprise user account management
*Centralized authentication for network resources
*Computer policy enforcement
*Software distribution to workstations
*Single Sign-On (SSO) for applications
*IT compliance and audit trail
*Password policy enforcement
*Remote desktop access control

Extensions & Next Steps

  • Integrate with Azure AD for hybrid cloud identity
  • Implement ADFS for SAML-based SSO to cloud apps
  • Add RADIUS server for 802.1X WiFi authentication
  • Build a Just-In-Time privileged access system
  • Implement PAW (Privileged Access Workstations) security tier model

Interactive Playground

Coming Soon

An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.

Frequently Asked Questions

What is the difference between Active Directory and LDAP?
LDAP (Lightweight Directory Access Protocol) is a protocol for accessing directory information — a universal standard. Active Directory is Microsoft's implementation of a directory service that uses LDAP (and Kerberos, DNS, and other protocols). AD stores users, computers, groups, and policies in a hierarchical database. Other LDAP implementations: OpenLDAP (open source), FreeIPA (Red Hat's free Linux alternative to AD), 389 Directory Server. Samba 4 can act as an AD domain controller using open-source software — full compatibility with Windows AD clients.
Advertisement