Cover
Internal Training Guide
Building and Managing a Microsoft Active Directory Lab
This interactive guide walks through the complete lab in order. Use Next and Back to move between sections, or choose Show Complete Guide to display everything on one page.
Take screenshots, record commands, document errors, and explain how each issue was resolved.
Purpose and Lab Design
Purpose
The purpose of this training is to build a complete Microsoft Active Directory lab from the beginning and practice common Windows Server administration tasks.
The trainee will connect to VMware ESXi, create an isolated virtual network, upload Windows installation ISO files, install two virtual machines, configure Active Directory, DNS and DHCP, join a Windows client to the domain, manage users and groups, configure shared folders and Group Policies, and use PowerShell for bulk administration.
Lab Design
| Virtual Machine | Operating System | Purpose |
|---|---|---|
DC01 | Windows Server 2022 | Domain Controller, DNS, DHCP and file server |
CLIENT01 | Windows 10 Pro or Windows 11 Pro | Domain-joined client used for testing |
Suggested configuration
- Domain:
training.local - Network:
192.168.50.0/24 - DC01:
192.168.50.10 - DHCP range:
192.168.50.100to192.168.50.200 - CLIENT01: Assigned automatically by DHCP
This lab must remain isolated from the production network and from the internet.
Important Rules
Important Rules to Remember
Use Windows 10/11 Pro, Enterprise, or Education. Do not install Windows Home for this lab.
The domain client must use the Domain Controller as its DNS server: 192.168.50.10. Do not configure public DNS servers such as 8.8.8.8 or 1.1.1.1 on the client.
Configure DC01 with a fixed IP address. A Domain Controller should not receive its IP address from DHCP.
Create an ESXi virtual switch with no physical uplink. This lets the virtual machines communicate with each other without reaching the production network.
Create a security group, add users to the group, and assign permissions to the group. Avoid assigning permissions directly to individual users.
Confirm that a share works using its UNC path, such as \\DC01\General, before trying to map it through Group Policy.
Part 1 — Connect to VMware ESXi
Objective
Connect to the VMware ESXi Host Client and confirm that the host is ready for the training lab.
Steps
- From a computer that can reach the ESXi management address, open a web browser.
- Enter
https://ESXI-IP-ADDRESS. - Review the certificate warning and continue only after confirming the address is correct.
- Log in using the ESXi administrative credentials.
- Review host health, CPU, memory, datastore capacity, virtual switches, port groups and existing virtual machines.
The ESXi Host Client is the web interface used to manage virtual machines, storage, networking and ISO files on a standalone ESXi host.
Record
- ESXi hostname and management IP
- ESXi version
- Available datastore space
- The datastore selected for the lab
Do not include passwords in the documentation.
Part 2 — Create an Isolated ESXi Network
Objective
Create a virtual network that allows DC01 and CLIENT01 to communicate without reaching the production network or internet.
The isolated virtual switch must have no physical uplink. Do not attach vmnic0, vmnic1, or any other physical adapter.
Steps
- Open Networking → Virtual switches.
- Create a standard virtual switch named
vSwitch-Lab. - Do not assign an uplink.
- Open Networking → Port groups.
- Create a port group named
AD-Lab. - Attach it to
vSwitch-Lab. - Use VLAN ID
0.
A virtual switch without a physical uplink behaves like an internal Ethernet switch. The lab VMs can communicate with one another but cannot reach external systems.
Validation
vSwitch-Labexists.- It has no physical uplink.
AD-Labis connected tovSwitch-Lab.
Part 3 — Upload Installation ISO Files
Objective
Upload Windows installation media to an ESXi datastore so it can be attached to the virtual machines.
Required ISO Files
- Windows Server 2022 ISO
- Windows 10 Pro or Windows 11 Pro ISO
Steps
- Open Storage → Datastores.
- Select the datastore for the lab.
- Open Datastore browser.
- Create a folder named
ISO. - Upload the Windows Server and Windows client ISO files.
- Wait until each upload completes.
An ISO file is a virtual copy of an installation DVD. ESXi can attach it to a virtual CD/DVD drive.
Validation
Confirm that both ISO files appear in the datastore browser and record their exact file names and paths.
Part 4 — Create the Domain Controller VM
Objective
Create the Windows Server virtual machine that will later become the Domain Controller.
Suggested configuration
| VM name | DC01 |
|---|---|
| Guest OS | Windows Server 2022 |
| CPU | 2 vCPU |
| Memory | 4–8 GB |
| Disk | 80 GB |
| Network | AD-Lab |
Steps
- Open Virtual Machines → Create / Register VM.
- Select Create a new virtual machine.
- Enter the suggested configuration.
- Attach the Windows Server ISO to the CD/DVD drive.
- Enable Connect at power on.
- Complete the wizard.
Make sure the network adapter is connected to AD-Lab, not to a production port group.
Part 5 — Install Windows Server
Steps
- Power on
DC01. - Open the VM console.
- Start Windows installation.
- Select Windows Server 2022 Standard or the approved equivalent with Desktop Experience.
- Complete the installation and set the local Administrator password.
- Install VMware Tools.
- Set the correct timezone.
- Rename the server to
DC01. - Restart the server.
Select an edition with Desktop Experience. It includes the graphical interface and is more suitable for a new trainee.
VMware Tools
From ESXi, choose Actions → Guest OS → Install VMware Tools, then run the installer inside Windows and restart if requested.
Part 6 — Configure the DC IP Address
Objective
Assign a permanent IP address to DC01.
Configuration
| IP address | 192.168.50.10 |
|---|---|
| Subnet mask | 255.255.255.0 |
| Default gateway | Leave blank |
| Preferred DNS | 192.168.50.10 |
| Alternate DNS | Leave blank |
A Domain Controller must use a static IP address and should use itself as its preferred DNS server.
Do not configure a default gateway because this lab is intentionally disconnected from external networks.
Run:
ipconfig /all
Confirm that all settings are correct.
Part 7 — Install Active Directory and DNS
Objective
Install Active Directory Domain Services and create a new domain.
Steps
- Open Server Manager.
- Select Manage → Add Roles and Features.
- Install Active Directory Domain Services and DNS Server.
- Select the notification flag and choose Promote this server to a domain controller.
- Select Add a new forest.
- Enter
training.local. - Set a Directory Services Restore Mode password.
- Complete the wizard and restart.
Validation
- Log in as
TRAINING\Administrator. - Open Active Directory Users and Computers.
- Open DNS Manager.
- Open Group Policy Management.
- Run
net share. - Confirm that
NETLOGONandSYSVOLexist.
Active Directory manages identities, authentication, groups, OUs and Group Policy. DNS allows clients to locate domain services such as Kerberos and LDAP.
Part 8 — Install and Configure DHCP
Objective
Configure DC01 to assign IP settings to lab clients automatically.
Steps
- Install the DHCP Server role.
- Complete the DHCP post-installation configuration.
- Authorize the DHCP server in Active Directory.
- Create and activate an IPv4 scope.
Suggested scope
| Name | Training Network |
|---|---|
| Range | 192.168.50.100–192.168.50.200 |
| Subnet mask | 255.255.255.0 |
| Gateway | Leave blank |
| DNS server | 192.168.50.10 |
| DNS domain | training.local |
The DHCP scope must provide the Domain Controller as DNS. Correct: 192.168.50.10. Incorrect: public DNS servers.
Part 9 — Create the Client VM
Suggested configuration
| VM name | CLIENT01 |
|---|---|
| Guest OS | Windows 10 or Windows 11 |
| CPU | 2 vCPU |
| Memory | 4–8 GB |
| Disk | 60 GB |
| Network | AD-Lab |
Attach the Windows client ISO and enable Connect at power on.
Install Windows Pro, Enterprise, or Education. Windows Home cannot join an Active Directory domain.
Part 10 — Install and Prepare the Client
Steps
- Install Windows on
CLIENT01. - Install VMware Tools.
- Rename the computer to
CLIENT01. - Configure the network adapter to obtain an IP address automatically.
- Restart the computer.
Validation
Run:
ipconfig /all
ping 192.168.50.10
nslookup dc01.training.local
nslookup training.local
The client should receive:
- An IP between
192.168.50.100and192.168.50.200 - Subnet mask
255.255.255.0 - DNS server
192.168.50.10 - DNS suffix
training.local
Do not attempt to join the domain until dc01.training.local resolves to 192.168.50.10.
Part 11 — Create the AD Structure
Organizational Units
Lab UsersLab ComputersDisabled UsersSecurity Groups
Global Security Groups
FileShare_RWManagement_UsersHR_UsersIT_Users
OUs organize directory objects and are commonly used for Group Policy. Security groups are used to grant access to resources.
Part 12 — Create the First User
Create one user manually
| First name | John |
|---|---|
| Last name | Smith |
| Display name | John Smith |
| Username | jsmith |
| Temporary password | Training@123 |
Place the user in Lab Users, require a password change at next logon, and add the user to:
FileShare_RWManagement_Users
The first user is created manually so the trainee understands the process before automating it with PowerShell.
Part 13 — Join CLIENT01 to the Domain
Pre-checks
ipconfig /all
nslookup dc01.training.local
ping dc01
Steps
- Join
CLIENT01totraining.local. - Use authorized domain administrator credentials.
- Restart the client.
- Move the computer object into
Lab Computers.
Joining the domain creates a computer account in Active Directory and allows domain users and Group Policies to be used on the client.
Part 14 — Log In with the Domain User
Steps
- At the sign-in screen, choose Other user.
- Log in with
TRAINING\jsmithorjsmith@training.local. - Enter the temporary password.
- Change the password when prompted.
Run:
whoami
Expected result:
training\jsmith
DNS, client connectivity, the domain join, the user account and domain authentication are all working.
Part 15 — Disable and Re-enable the User
Steps
- Disable
jsmithin Active Directory Users and Computers. - Sign out from
CLIENT01. - Attempt to sign in again.
- Record the error.
- Re-enable the account.
- Test sign-in again.
Disabling an account prevents login without deleting the account or its settings.
Part 16 — Configure Account Lockout
Configure the lab policy
Edit the Default Domain Policy:
Computer Configuration
Policies
Windows Settings
Security Settings
Account Policies
Account Lockout Policy
Suggested values
- Threshold: 5 invalid attempts
- Duration: 15 minutes
- Reset counter after: 15 minutes
Test
- Run
gpupdate /forceon the client. - Enter the wrong password enough times to lock the account.
- Verify that the account is locked.
- Unlock it in Active Directory Users and Computers.
- Test login again.
Part 17 — Reset the User Password
Steps
- Reset the password for
jsmith. - Assign a temporary password.
- Enable User must change password at next logon.
- Log in with the temporary password.
- Set a new password.
Administrators cannot view a user's existing password. They can only reset it.
Part 18 — Create the First Shared Folder
Create and share
Create C:\Shares\General and share it as General.
UNC path: \\DC01\General
Suggested permissions
- Share: Authenticated Users — Change and Read
- NTFS: Administrators — Full Control
- NTFS:
FileShare_RW— Modify
Share permissions apply over the network. NTFS permissions apply to files and folders on disk. Effective access is based on the most restrictive combination.
Test
From CLIENT01, open \\DC01\General and create, modify and delete a test file.
Part 19 — Map the General Drive with GPO
Create the GPO
Name: Map General Drive
Link it to: Lab Users
Configure
User Configuration
Preferences
Windows Settings
Drive Maps
- Action: Update
- Location:
\\DC01\General - Drive letter:
Z: - Label: General Share
- Reconnect: Enabled
Test
gpupdate /force
Sign out and sign back in, then confirm that Z: appears.
This is a user policy. Link it to the OU containing the user, not only the OU containing the computer.
Part 20 — Generate 100 Fictional Users
Objective
Use an approved AI tool to generate 100 fictional employee records.
Required fields
- FirstName
- LastName
- DisplayName
- Username
- Department
- Password
Example CSV
FirstName,LastName,DisplayName,Username,Department,Password
John,Smith,John Smith,jsmith,IT,Training@123
Sarah,Adams,Sarah Adams,sadams,HR,Training@123
Save as C:\Lab\Users.csv.
Confirm that there are exactly 100 users, usernames are unique, required fields are present, department names are consistent, and passwords meet policy.
Part 21 — Create Users with PowerShell
Run on DC01
Import-Module ActiveDirectory
$Users = Import-Csv "C:\Lab\Users.csv"
$OU = "OU=Lab Users,DC=training,DC=local"
foreach ($User in $Users) {
$SecurePassword = ConvertTo-SecureString `
$User.Password `
-AsPlainText `
-Force
New-ADUser `
-Name $User.DisplayName `
-GivenName $User.FirstName `
-Surname $User.LastName `
-DisplayName $User.DisplayName `
-SamAccountName $User.Username `
-UserPrincipalName "$($User.Username)@training.local" `
-Department $User.Department `
-Path $OU `
-AccountPassword $SecurePassword `
-Enabled $true `
-ChangePasswordAtLogon $true
}
Verify
Get-ADUser `
-SearchBase "OU=Lab Users,DC=training,DC=local" `
-Filter * |
Measure-Object
Part 22 — Add Users to Security Groups
Example script
$Users = Import-Csv "C:\Lab\Users.csv"
foreach ($User in $Users) {
if ($User.Department -eq "IT") {
Add-ADGroupMember `
-Identity "IT_Users" `
-Members $User.Username
}
if ($User.Department -eq "HR") {
Add-ADGroupMember `
-Identity "HR_Users" `
-Members $User.Username
}
}
Verify
Get-ADGroupMember -Identity "IT_Users"
Get-ADGroupMember -Identity "HR_Users"
Group-based permission management is easier and safer than assigning access directly to many users.
Part 23 — Export Users to CSV
Run
Get-ADUser `
-SearchBase "OU=Lab Users,DC=training,DC=local" `
-Filter * `
-Properties DisplayName,Department,Enabled,DistinguishedName |
Select-Object `
Name,
DisplayName,
SamAccountName,
Department,
Enabled,
DistinguishedName |
Export-Csv `
"C:\Lab\AD-User-Inventory.csv" `
-NoTypeInformation
User exports are useful for audits, reports, inventory, troubleshooting and migration preparation.
Part 24 — Create a Second Shared Folder
Create and share
Create C:\Shares\Management and share it as Management.
UNC path: \\DC01\Management
Suggested NTFS permissions
- Administrators — Full Control
Management_Users— Modify- Other users — No access
Test manually
Test with one member of Management_Users and one user who is not a member.
Always test folder permissions manually before creating the mapped-drive GPO.
Part 25 — Map the Management Drive Selectively
Create the GPO
Name: Map Management Drive
Link it to: Lab Users
Drive configuration
- Location:
\\DC01\Management - Drive letter:
M: - Label: Management Share
- Action: Update
Recommended: Item-Level Targeting
- Open the mapped drive properties.
- Select Common.
- Enable Item-level targeting.
- Add a Security Group condition.
- Select
Management_Users.
Item-Level Targeting controls one preference item. Security Filtering controls whether the entire GPO applies.
Test
- A management user receives
M:. - A normal user does not receive
M:. - An unauthorized user cannot open the share manually.
Part 26 — Enforce a Desktop Wallpaper
Prepare the image
Create C:\Shares\Wallpapers, share it as Wallpapers, and copy the image there.
Example path: \\DC01\Wallpapers\company-wallpaper.jpg
Grant Domain Users read access and test that the user can open the image manually.
Create the GPO
Name: Corporate Wallpaper
Link it to: Lab Users
User Configuration
Policies
Administrative Templates
Desktop
Desktop
Desktop Wallpaper
Set the UNC path and select a wallpaper style.
Also enable:
User Configuration
Policies
Administrative Templates
Control Panel
Personalization
Prevent changing desktop background
Use a UNC path for domain resources. A local path such as C:\Shares\... refers to the client computer, not the server.
Part 27 — Restrict Control Panel
Create the GPO
Name: Restrict Control Panel
Link it to Lab Users or to a dedicated test-user OU.
User Configuration
Policies
Administrative Templates
Control Panel
Prohibit access to Control Panel and PC settings
Enable the policy, run gpupdate /force, sign out and sign back in, then test Control Panel and Windows Settings.
Do not test restrictive policies using the main administrative account. Use a dedicated test user.
Part 28 — Verify Applied Group Policies
Commands
gpresult /r
mkdir C:\Temp
gpresult /h C:\Temp\GPReport.html
rsop.msc
Event Viewer
Applications and Services Logs
Microsoft
Windows
GroupPolicy
Operational
gpresult shows which policies were applied or denied. The HTML report provides more detail than the command-line summary.
Part 29 — Important Commands
Network and DNS
ipconfig /all
ipconfig /release
ipconfig /renew
ipconfig /flushdns
nslookup dc01.training.local
ping dc01
User and Group Policy
whoami
whoami /groups
gpupdate /force
gpresult /r
gpresult /h C:\Temp\GPReport.html
Active Directory PowerShell
Get-ADUser -Filter *
Get-ADGroupMember -Identity "FileShare_RW"
Troubleshooting Guide
CLIENT01 does not receive DHCP
- Confirm both VMs use
AD-Lab. - Confirm the DHCP service is running.
- Confirm the DHCP server is authorized.
- Confirm the scope is active and has available addresses.
CLIENT01 cannot join the domain
- Confirm the client uses
192.168.50.10as DNS. - Confirm
nslookup dc01.training.localworks. - Confirm time and domain name are correct.
The client is using the wrong DNS server.
User cannot log in
- Account enabled and not locked
- Password correct
- Domain Controller reachable
- User signing in to the domain, not the local computer
Mapped drive does not appear
- Share works manually
- GPO linked to the correct user OU
- User has permission
gpresult /rshows the GPO- Item-Level Targeting group is correct
- User signed out and back in
Required Deliverables
Required Deliverables
- ESXi Host Client connection screenshot
- Host and datastore information
- Isolated virtual switch and port group
- Confirmation that the switch has no physical uplink
- Uploaded Windows ISO files
- DC01 and CLIENT01 VM configurations
- Windows Server and client installations
- Domain Controller static IP configuration
- Active Directory, DNS and DHCP configuration
- OU and security-group structure
- Manual user and successful domain join
- Successful domain-user login
- Disabled, locked and reset-password tests
- General share and mapped Z: drive
- CSV containing 100 fictional users
- PowerShell user-creation script
- Evidence that users were created
- Group-membership results
- Exported user inventory
- Management share and selective M: drive
- Unauthorized-user test
- Desktop wallpaper GPO
- Control Panel restriction
- Group Policy HTML report
- Troubleshooting notes and learning summary
Documentation Template
Use this format for every task
Objective
Explain what the task is intended to achieve.
Prerequisites
List anything that must already be configured.
Steps Performed
Write the steps in the order completed.
Commands Used
Include PowerShell and Command Prompt commands.
Screenshots
Add screenshots showing the important configuration and result.
Expected Result
Explain what should happen.
Actual Result
Explain what actually happened.
Errors Encountered
Record the exact error message where possible.
Resolution
Explain how the issue was fixed.
What I Learned
Write a brief summary of what was learned.
Final Review Questions
The trainee should be able to explain
- Why Windows Home cannot be used as a domain client.
- Why a Domain Controller requires a static IP address.
- Why Active Directory depends on DNS.
- Why domain clients must use the Domain Controller as DNS.
- Why the isolated ESXi switch has no physical uplink.
- The difference between an OU and a security group.
- The difference between disabling and deleting a user.
- The difference between a disabled and locked account.
- The difference between share and NTFS permissions.
- Why permissions should normally be assigned to groups.
- The difference between Security Filtering and Item-Level Targeting.
- Why restrictive GPOs should be tested with a normal test user.
- How to force Group Policy processing.
- How to verify which Group Policies were applied.
- How CSV and PowerShell simplify bulk administration.