Active Directory Lab Part II: Customization Prerequisites

Overview

This post is part of a series illustrating how to automate the process of deploying an AD Lab. This article provides information on system requirements and implementing the prerequisites for customizing the installer ISOs.

There is an in-progress project to automate these steps. Please see OZO AD Lab Implement Customization Prerequisites for more details.

System Requirements

  • Microsoft Windows Server, Enterprise, or Pro
  • Hyper-V and related management tools
  • Windows Subsystem for Linux (“WSL”)
  • The Debian distribution for WSL
  • 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 external (Internet) adapter 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:

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 (oscdimg.exe) required for the ISO customization process.

Install Windows Subsystem for Linux and the Debian Distribution

Run this command in an Administrator PowerShell to install WSL and the Debian distribution:

wsl --install --distribution Debian

Download and Extract the OZO AD Lab Resources

The assets used in this process are released on Github. Download the latest release and extract it to C:\ozo-ad-lab.

The root of C? Really!?

Certainly some readers will balk at the idea of placing these resources in the root of C, and I sympathize. The reasons are two-fold: (1) keeping the paths short and predictable for the following instructions, and more importantly (2) the oscdimg.exe tool cannot handle paths with spaces. The good news is that the ozo-ad-lab directory is temporary and can be deleted as desired at the end of part two of this series.

Create a new empty folder, C:\ozo-ad-lab\Mount. If done correctly, you should see the following files and folders under C:\ozo-ad-lab:

Download Installer ISOs

Download these AlmaLinux and Microsoft Windows installer ISOs to C:\ozo-ad-lab\ISO and rename them as follows:

DownloadAbsolute File Name
AlmaLinux 9.5 x86_64 Boot ISOC:\ozo-ad-lab\ISO\almalinux-boot.iso
Microsoft Windows 11 Enterprise Evaluation editionC:\ozo-ad-lab\ISO\microsoft-windows-11-enterprise-evaluation.iso
Windows 11 Languages and Optional Features ISOC:\ozo-ad-lab\ISO\microsoft-windows-11-laof.iso
Microsoft Windows Server 2022 Evaluation editionC:\ozo-ad-lab\ISO\microsoft-windows-server-2022-evaluation.iso

Part I – Introduction

Part II – Customization

Part III – Installation

Part IV – Conclusion