This post is part of a series illustrating how to automate the process of deploying an AD Lab. This article details how to create the required Hyper-V virtual machines.
You can use my automation script, OZO AD Lab Create VMs to perform these steps with a single command!
Create the Virtual Machines
Use these steps to create Server and Client virtual machines. Open Hyper-V Manager and click New > Virtual Machine:
Specify Name and Location

| VM | Name |
| Server | OZO AD Lab Windows AD Domain Controller |
| Client | OZO Ad Lab Windows Client |
Specify Generation

All VMS: select Generation 2.
Assign Memory

| VM | Startup memory |
| Server | 2048 |
| Client | 4096 |
Configure Networking

All VMS: select OZO AD Lab NAT.
Connect Virtual Hard Disk

All VMs: accept the default Name and Location.
Installation Options

| VM | option | Image file (.iso) |
|---|---|---|
| Server | Install an operating system from a bootable image file | Downloads\OZO-AD-Lab-Server.iso |
| Client | Install an operating system from a bootable image file | Downloads\OZO-AD-Lab-Client.iso |
Edit the Hyper-V Virtual Machine Settings
Use these steps to edit the virtual machines. Open Hyper-V Manager, select a VM, and click Settings:
Security

All VMs: enable secure boot, select the Microsoft Windows template, and enable trusted platform module.
Memory

| VM | Maximum RAM | Memory buffer |
| Server | 2048 | 5% |
| Client | 4096 | 5% |
Integration Services

All VMs: check Guest services.
Checkpoints

All VMs: uncheck Enable checkpoints.
Automatic Start Action

All VMs: select Nothing.
Automatic Stop Action

All VMs: Select Shut down the guest operating system.
Part I – Introduction
Part II – Customization
Part III – Installation
- Installation Prerequisites
- Create the Virtual Machines
- Install the VMs