Skip to main content
AD Academy
Practice and Learning
Beginner20 minLast updated: Topic 1 of 2

Building a Home Lab for AD

How to set up a safe practice environment on your computer.

Not read

What you will learn here

  • What you need for a home lab
  • How to install your first DC
  • How to keep the lab isolated

The best way to learn is to break it yourself — in an isolated environment. A basic Lab requires one Windows Server virtual machine and one client.

What you need

  • Hypervisor: VirtualBox, VMware Workstation, or Hyper-V.
  • Windows Server 2019/2022 Evaluation (180 days free).
  • Windows 10/11 as a client station that will join the .
  • Internal/Host-Only network only — no internet access from the lab.
# Install AD DS role and create new Forest
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName "lab.local" -InstallDNS
powershell
Architecture and Theory — Under the Hood

A stable lab environment for an base requires at least 3 VMs: DC (2 vCPU / 4 GB / 60 GB), Member Server (2 GB), Windows 10/11 workstation. Hyper-V, VMware Workstation, and VirtualBox work; Snapshot is recommended before every practice.

  • Closed internal network with NAT for Internet access — not in Bridge mode.
  • name for Lab: corp.local or lab.internal — not a real public name.
  • DC = also DNS. Lab workstations receive DNS = DC address only.
Practical Setup (PowerShell / GUI)
# First DC Setup (from Server Core / Full)
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName 'corp.local' -DomainNetbiosName 'CORP' -InstallDNS -Force

# Join Member Server
Add-Computer -DomainName corp.local -Credential CORP\Administrator -Restart

# Create Basic OU
New-ADOrganizationalUnit -Name 'IT' -Path 'DC=corp,DC=local'
New-ADOrganizationalUnit -Name 'Users' -Path 'OU=IT,DC=corp,DC=local'
powershell
Real-world Scenarios in the Organization
  • Lab for practicing NTFS/Share permissions and .
  • Lab for Attack exercises: Kerberoast, , — with an additional Kali machine.
  • Lab for practicing backup/restore — Snapshot Rollback is preferable after every attempt.
Troubleshooting
  • DC does not boot after an old Snapshot → USN Rollback. Solved by rebuilding.
  • Workstations do not find the domain → Check that DNS points to DC only, not to 8.8.8.8.
  • Time errors ( > 5 minutes deviation) → w32tm /resync on the workstation.
Glossary and quick command line
  • Hyper-V / VMware / VBox — all work.
  • Snapshot before each lesson.
  • Evaluation ISO of Windows Server gives 180 days.
  • Sysprep on a template before cloning VMs.

Check yourself

Which command sets up a new Forest?

Was this page helpful?