IDENTITY / DNS / GROUP POLICY
Active Directory Lab
Configuration walkthrough · infrastructure validation requiredDownload project pack ↓01 / Objective
Build an isolated domain and trace how a user moves from account provisioning to a managed Windows desktop.
One Windows Server VM, one domain-capable Windows client, an isolated virtual switch and authorised installation media. Use lab.example and synthetic users.
02 / Architecture
03 / Configuration walkthrough
- Establish the baseline
Create disposable VMs, record their allocations and set a static address on the domain controller. Ensure the client uses the lab DNS server, not a public resolver.
- Deploy the directory
Use the supplied AD walkthrough to install AD DS and create the isolated forest. Review prerequisite checks and enter the recovery password interactively.
- Model user access
Create a Lab OU with Admin, Staff and Students child OUs. Generate the onboarding plan from synthetic CSV data, review it, then create only the accounts needed for the exercise.
- Apply a scoped policy
Link one harmless test policy to the Lab OU. Join the client, sign in with a test user and inspect effective policy with gpresult /r.
- Test a failure
Temporarily point the disposable client at an incorrect DNS server. Record the failure, restore lab DNS and repeat the domain lookup before retrying the join.
04 / Scripts & source files
Select a file to read its full source. Downloads are optional.
configs/ad-walkthrough.txt
Download this file ↓# Isolated Windows Server lab only. Review and execute individually.
# Prerequisites: licensed/evaluation media, local admin session, isolated switch.
# Configure a static lab IP and DNS plan before promotion. No secrets are stored.
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName 'lab.example' -InstallDNS
# Promotion prompts for the DSRM password and normally restarts the server.
# After restart, use an authorised domain administrator session:
Get-ADDomain
Get-ADDomainController -Filter *
Resolve-DnsName -Type SRV '_ldap._tcp.dc._msdcs.lab.example'
# Create Lab OU and child OUs Admin, Staff, Students with management tools.
# Link a harmless test GPO ONLY to the Lab OU. Do not change Default Domain Policy.
# Join one disposable Windows client using its own lab DNS setting.
# On the client:
whoami
gpresult /r
# Evidence: capture redacted OU structure, domain join and effective policy.
# Rollback: revert or remove disposable lab VMs, never production controllers.
scripts/onboarding-plan.ps1
Download this file ↓# Build a reviewable onboarding plan from synthetic input. Does not create accounts.
[CmdletBinding()]
param([string]$InputPath = (Join-Path $PSScriptRoot '../data/sample-users.csv'))
$ErrorActionPreference = 'Stop'
$seen = @{}
$departments = @('Admin','Staff','Students')
foreach ($user in (Import-Csv -LiteralPath $InputPath)) {
$account = ([string]$user.Account).Trim().ToLowerInvariant()
if ($account -notmatch '^[a-z][a-z0-9.-]{2,19}$') { throw "Invalid sample account: $account" }
if ($seen.ContainsKey($account)) { throw "Duplicate account: $account" }
if ($departments -notcontains $user.Department) { throw "Unknown department: $($user.Department)" }
if ([string]::IsNullOrWhiteSpace($user.DisplayName)) { throw 'DisplayName is required.' }
$seen[$account] = $true
[pscustomobject]@{
Account = $account
DisplayName = $user.DisplayName
UserPrincipalName = "$account@lab.example"
Department = $user.Department
TargetOU = "OU=$($user.Department),OU=Lab,DC=lab,DC=example"
Action = 'Review only - no account created'
}
}
data/sample-users.csv
Download this file ↓Account,DisplayName,Department
alex.sample,Alex Sample,Staff
sam.demo,Sam Demo,Admin
taylor.lab,Taylor Lab,Students
05 / Result & evidence
Expected infrastructure result: a joined client with working directory lookup and correctly scoped policy. The onboarding planner is executable using the supplied sample CSV; no accounts are created by that script.
| Sample account | Department | Proposed UPN |
|---|---|---|
| alex.sample | Staff | alex.sample@lab.example |
| sam.demo | Admin | sam.demo@lab.example |
| taylor.lab | Students | taylor.lab@lab.example |
06 / Validation & troubleshooting
- SRV lookup returns the lab domain controller.
- The synthetic user can sign in to the joined client.
- The test GPO is applied only to the intended OU.
- A DNS fault is distinguishable from an authentication failure.
| Symptom | Investigation |
|---|---|
| Domain cannot be located | Check client DNS, server address and the SRV lookup before changing the account. |
| Policy missing | Check OU placement, security filtering and gpresult output; distinguish user and computer policy. |
Screenshots & capture guide
Capture the Lab OU hierarchy, redacted DNS SRV lookup and client gpresult output after a real run.
No employer screenshots or simulated terminal images are used as proof of deployment.
07 / Lessons learned
- DNS is a dependency of directory discovery, not a separate afterthought.
- OU design and GPO scope should be checked from the endpoint.
- Keep recovery credentials out of scripts, screenshots and source control.