Overview
This is the third post in a multi-part series that illustrates how to customize the Windows installer media to automate the process of installing a Windows AD domain controller, a Windows file server, and a Windows desktop environment. This article provides information on implementing the prerequisites for the AD Lab.
- Introduction
- Architecture
- Prerequisites
- Create the Virtual Machines
- Customize the Windows installer ISOs
- Install the Linux Router
- Install the Windows Systems
- Conclusion
System Requirements
- Microsoft Windows Server, Enterprise, or Pro
- Hyper-V and related management tools
- An external (Internet) network connection
- 45GB persistent storage for virtual machine disks
- 40GB temporary storage for downloaded ISOs, customized ISOs, and exported virtual machine archives
- 10GB memory
- 5 virtual CPUs
Prerequisites
Install Hyper-V Components
Run these commands in an Administrator PowerShell to install the Hyper-V components and restart:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Restart-Computer
Grant Permissions
Using an account with Administrator rights, add your [regular] user to the local Hyper-V Administrators group, then log out and back in.
Configure Networking
You will need an external switch and a private switch. Use Get-NetAdapter
to find the name of your network interface and New-VMSwitch
to create the virtual switches, e.g., if your network interface is named Ethernet:
Get-NetAdapter
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
Ethernet Realtek USB GbE Family Controller 24 Up AC-1A-3D-7B-7D-34 1 Gbps
New-VMSwitch -Name "AD Lab External" -NetAdapterName "Ethernet"
New-VMSwitch -Name "AD Lab Private" -SwitchType Private
Your new switches will appear in the Hyper-V Virtual switch manager:
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Switch-Manager-1024x975.png)
Install Microsoft Kits
Download and run the latest Microsoft Assessment and Deployment Kit and select the Deployment Tools feature during installation. This kit provides the Windows System Image Manager (“Windows SIM”) and the Deployment and Imaging Tools Environment that includes oscdimg.exe
.
Install Git for Windows
Download and install Git for Windows.
Clone the Git Repository
The answer files and scripts used in this process are contained in a One Zero One Gitlab repository. Clone this repository to a local directory (Note: Due to a limitation with oscdimg.exe
, this path may not contain spaces. Execute the following in an Administrator PowerShell:
Set-Location "C:\"
git clone git@github.com:onezeroone-dev/OZO-AD-Lab.git
After cloning, create a Mount
subdirectory of C:\ozo-ad-lab
.
Download Installer ISOs
Download these AlmaLinux and Microsoft Windows installer ISOs to C:\ISO
and rename them as follows.
Download | Absolute File Name |
---|---|
AlmaLinux 9.5 x86_64 minimal | C:\ozo-ad-lab\ISO\almalinux-9.5-x86_64-minimal.iso |
Microsoft Windows 11 Enterprise Evaluation edition | C:\ |
Windows 11 Languages and Optional Features ISO | C:\ |
Microsoft Windows Server 2022 Evaluation edition | C:\ |