Web Dev11 min read · 20 March 2026
Setting Up Windows Server 2022 Active Directory on VMware Workstation
A complete walkthrough of my CN5009 WBL project: deploying a virtualised enterprise IT infrastructure with Windows Server 2022 Domain Controller, Windows 10 client, and Ubuntu LAMP server on VMware Workstation Pro 17.
VMwareWindows Server 2022Active DirectoryUbuntuLAMPDNSDHCP
Project Overview
For my CN5009 Work-Based Learning placement at the University of East London, I built a complete virtualised enterprise IT infrastructure. The setup mirrors a real small business network:
- WIN-DC01 — Windows Server 2022 Domain Controller (192.168.1.10)
- WIN-CLIENT01 — Windows 10 workstation joined to domain
- UBUNTU-WEB01 — Ubuntu 22.04 LAMP server (192.168.1.30)
- Domain: project.local
- Network: VMnet1 (Host-only, 192.168.1.0/24)
VMware Network Configuration
All VMs use Host-Only networking on VMnet1. This creates an isolated network with no internet access — perfect for a lab environment.
VMnet1: 192.168.1.0/24 (Host-only)
├── WIN-DC01: 192.168.1.10 (static)
├── WIN-CLIENT01: 192.168.1.20 (static)
└── UBUNTU-WEB01: 192.168.1.30 (static)
Step 1 — Windows Server 2022 Setup
After installing Windows Server 2022, set a static IP:
powershell
# Set static IP
New-NetIPAddress -InterfaceAlias "Ethernet0" `
-IPAddress 192.168.1.10 `
-PrefixLength 24 `
-DefaultGateway 192.168.1.1
# Set DNS to itself (DC will be its own DNS)
Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" `
-ServerAddresses 192.168.1.10
# Rename the server
Rename-Computer -NewName "WIN-DC01" -Restart
Step 2 — Install Active Directory Domain Services
powershell
# Install AD DS role
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
# Promote to Domain Controller
Import-Module ADDSDeployment
Install-ADDSForest `
-DomainName "project.local" `
-DomainNetbiosName "PROJECT" `
-ForestMode "WinThreshold" `
-DomainMode "WinThreshold" `
-InstallDns:$true `
-SafeModeAdministratorPassword (ConvertTo-SecureString "P@ssword123!" -AsPlainText -Force) `
-Force:$true
Server will restart automatically and become the DC for project.local.
Step 3 — Configure DNS & DHCP
powershell
# Install DHCP
Install-WindowsFeature -Name DHCP -IncludeManagementTools
# Create DHCP scope
Add-DhcpServerv4Scope `
-Name "project.local scope" `
-StartRange 192.168.1.100 `
-EndRange 192.168.1.200 `
-SubnetMask 255.255.255.0
# Set DHCP options (DNS and gateway)
Set-DhcpServerv4OptionValue `
-DnsServer 192.168.1.10 `
-Router 192.168.1.1
# Authorise DHCP in AD
Add-DhcpServerInDC -DnsName "WIN-DC01.project.local"
Step 4 — Create AD Users and OUs
powershell
# Create OUs
New-ADOrganizationalUnit -Name "Staff" -Path "DC=project,DC=local"
New-ADOrganizationalUnit -Name "IT" -Path "DC=project,DC=local"
New-ADOrganizationalUnit -Name "Computers" -Path "DC=project,DC=local"
# Create users
New-ADUser `
-Name "Hassan Mithun" `
-GivenName "Hassan" `
-Surname "Mithun" `
-SamAccountName "hmithun" `
-UserPrincipalName "hmithun@project.local" `
-Path "OU=IT,DC=project,DC=local" `
-AccountPassword (ConvertTo-SecureString "P@ssword123!" -AsPlainText -Force) `
-Enabled $true
# Add to Domain Admins
Add-ADGroupMember -Identity "Domain Admins" -Members "hmithun"
Step 5 — Join Windows 10 Client to Domain
On WIN-CLIENT01, set DNS to point at the DC:
powershell
Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" -ServerAddresses 192.168.1.10
Then join the domain:
powershell
Add-Computer -DomainName "project.local" `
-Credential (Get-Credential) `
-Restart
Log in with PROJECT\hmithun and domain credentials work across the network.
Step 6 — Ubuntu LAMP Server
bash
# Install LAMP stack
sudo apt update
sudo apt install apache2 mysql-server php php-mysql -y
# Set static IP
sudo nano /etc/netplan/00-installer-config.yaml
yaml
network:
version: 2
ethernets:
ens33:
addresses: [192.168.1.30/24]
gateway4: 192.168.1.1
nameservers:
addresses: [192.168.1.10]
bash
sudo netplan apply
# Test connectivity
ping WIN-DC01.project.local # Should resolve via AD DNS
Lessons Learned
- BSOD during AD promotion — caused by insufficient RAM. Minimum 2GB for Server 2022 — give it 4GB.
- DNS is everything — if DNS fails, nothing works. Always point clients at the DC for DNS first.
- Snapshot before promotion — take a VMware snapshot before promoting to DC. Reverting a misconfigured DC is painful.
- Host-only vs NAT — use Host-only for isolated lab networks. NAT gives internet but breaks domain resolution.
The full lab logs are documented in my CN5009 WBL placement report.