Complete Step-by-Step Guide for Active Directory Lab Setup
I'm using my blog name as company name 'Techstack'.
This includes:
- One
Primary Domain Controller (DC01)
- One
Additional Domain Controller for replication (DC02)
- One
Client computer (PC01)
- A
fully working Active Directory domain: techstack.local
- Active
Directory replication between DC01 and DC02
This guide is written in simple, non-technical language so
that anyone can follow it carefully.
PART 1: What You Are Building
Imagine you are creating a company called Techstack.
In a real company:
- There
is a main server that manages employees and passwords.
- Sometimes
there is a second backup server.
- Employee
computers connect to those servers to log in.
In this lab:
- DC01
= Main office server
- DC02
= Backup office server
- PC01
= Employee computer
Both servers will share information automatically. If one
fails, the other can still handle logins.
This is called replication.
PART 2: What You Need
1. Your Physical Computer
Minimum:
- 8GB
RAM (16GB strongly recommended for two servers)
- 120GB
free disk space
2. Virtualization Software
Install:
Oracle VM VirtualBox
Install normally.
- Beginner → Use VirtualBox
- Intermediate → Use VMware Workstation Player
- Windows Pro user → Use Hyper-V
- Enterprise simulation → Use ESXi
- Cloud-focused → Use Azure
3. Windows Server ISO
Download:
Windows Server 2022 or 2025
Choose Evaluation version.
4. Windows Client ISO
Download:
- Windows
11
or - Windows
10
PART 3: Create Primary Domain Controller (DC01)
Step 1: Create Virtual Machine
Open VirtualBox → Click New
Name:
DC01
Type:
Microsoft Windows
Version:
Windows Server 2022 or 2025 (64-bit)
RAM:
4GB minimum
Disk:
50GB
Finish.
Step 2: Attach ISO and Install
Attach Windows Server ISO under Settings → Storage.
Start machine.
Install:
Windows Server 2022 or 2025 Standard (Desktop Experience)
Set Administrator password.
Installation completes.
PART 4: Configure Static IP for DC01
Servers must have fixed IP addresses.
Inside DC01:
Open Network Settings.
Set:
IP Address: 192.168.10.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.10.1
DNS Server: 192.168.10.10
Click OK.
PART 5: Install Active Directory on DC01
Open Server Manager.
Click:
Add Roles and Features.
Select:
Active Directory Domain Services.
Install.
After installation:
Click:
Promote this server to a domain controller.
Choose:
Add a new forest.
Root domain name:
techstack.local
Set Directory Services Restore Mode password.
Click Install.
Server will restart.
DC01 is now the first Domain Controller for Techstack.
PART 6: Create Second Domain Controller (DC02)
Now we create the backup server.
Step 1: Create New VM
Name:
DC02
Type:
Microsoft Windows
Version:
Windows Server 2022 or 2025 (64-bit)
RAM:
4GB
Disk:
50GB
Finish.
Step 2: Install Windows Server
Attach same Windows Server ISO.
Install Desktop Experience edition.
Set Administrator password.
PART 7: Configure Static IP for DC02
Inside DC02:
Set:
IP Address: 192.168.10.11
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.10.1
Preferred DNS Server: 192.168.10.10
Important:
DNS must point to DC01 initially.
Click OK.
PART 8: Join DC02 to Techstack Domain
Before making it a Domain Controller, join it to the domain.
Right click:
This PC → Properties → Rename this PC (Advanced).
Click Change.
Select:
Domain
Type:
techstack.local
Enter:
Username:
Administrator
Password:
Domain Administrator password
Restart DC02.
Now DC02 is a member server in the domain.
PART 9: Promote DC02 to Additional Domain Controller
On DC02:
Open Server Manager.
Add Role:
Active Directory Domain Services.
Install.
After installation:
Click:
Promote this server to a domain controller.
Choose:
Add a domain controller to an existing domain.
Domain:
techstack.local
Enter domain credentials.
Select:
DNS Server
Global Catalog
Click Next.
Set Directory Services Restore Mode password.
Install.
Server restarts.
Now DC02 is a second Domain Controller.
PART 10: Configure DNS for Both Domain Controllers
To make replication stable:
On DC01:
Preferred DNS: 192.168.10.10
Alternate DNS: 192.168.10.11
On DC02:
Preferred DNS: 192.168.10.11
Alternate DNS: 192.168.10.10
This ensures both servers can find each other.
PART 11: Verify Replication
Log in to DC01.
Open:
Active Directory Users and Computers.
Create a new user:
Name:
TestUser1
Now log in to DC02.
Open:
Active Directory Users and Computers.
If you see TestUser1, replication works.
You can also create a user on DC02 and confirm it appears on
DC01.
This proves both Domain Controllers are synchronized.
PART 12: Create Client Computer (PC01)
Now create employee computer.
Step 1: Create VM
Name:
PC01
Type:
Windows 10 or 11
RAM:
2–4GB
Disk:
40GB
Install Windows normally.
Step 2: Configure Network
Set:
IP Address: 192.168.10.20
Subnet Mask: 255.255.255.0
Gateway: 192.168.10.1
DNS Server:
192.168.10.10
Alternate DNS:
192.168.10.11
PART 13: Join PC01 to Domain
Right click:
This PC → Properties → Rename this PC (Advanced).
Click Change.
Select Domain.
Type:
techstack.local
Enter domain credentials.
Restart PC.
Login using:
techstack\Administrator
PC01 is now part of Techstack domain.
PART 14: Test High Availability
To test backup functionality:
Shut down DC01.
Now try logging into PC01 using a domain user.
If login works, DC02 is successfully handling
authentication.
Start DC01 again.
Replication will automatically sync changes.
PART 15: What You Now Have
You have built a professional-level Active Directory lab
with:
- Two
Domain Controllers (DC01 and DC02)
- Automatic
replication
- DNS
redundancy
- One
domain (techstack.local)
- One
client machine
- Domain
users
This setup mirrors real company infrastructure.
PART 16: What You Can Practice Next
Now your Techstack enterprise lab supports advanced
practice:
- Creating
Organizational Units (OUs)
- Creating
department-based groups
- Applying
Group Policies
- Password
lockout policies
- File
Server configuration
- Roaming
profiles
- DNS
zone management
- FSMO
role transfer between DCs
- Simulating
DC failure scenarios
Final Summary
You have successfully created a fully functioning Active
Directory infrastructure for Techstack with redundancy and replication.
DC01 = Primary Domain Controller
DC02 = Secondary Domain Controller
PC01 = Domain Client
Both servers replicate automatically.
Users and passwords stay synchronized.
The environment behaves like a real corporate network.


Comments
Post a Comment