Test a Boot ISO
Create a Hyper-V virtual machine for testing OSDeploy boot media.
Use New-OSDeployHyperVM to create and start a Hyper-V virtual machine for testing OSDeploy boot media. The function creates the virtual disk, attaches the newest OSDeploy boot ISO, configures the VM, creates an initial checkpoint, and opens the Hyper-V console when VMConnect is available.
Create the Virtual Machine
Confirm the Requirements
Run the function on a physical computer that meets these requirements:
Windows 11 25H2 build 26200 or later
PowerShell 7.6 or later installed from the MSI package
Current OSDeploy module
Microsoft Hyper-V and the Hyper-V PowerShell tools
Administrator rights
curl.exeavailable inPATHEnough processor, memory, and storage capacity for the VM
Restart Windows after enabling Hyper-V. New-OSDeployHyperVM stops when Hyper-V is pending a restart, and it cannot run inside another virtual machine.
Create the VM
Open an elevated PowerShell 7.6 session and run the function without parameters:
New-OSDeployHyperVMThe default command creates a timestamp-named Generation 2 VM similar to 260829-143000 OSDeploy with this configuration:
Virtual processors
2
Startup memory
8 GB, fixed
Virtual disk
64 GB VHDX
Display resolution
1600x900
Secure Boot template
MicrosoftWindows
Initial checkpoint
Enabled
Start VM
Enabled
The function selects the newest bootmedia.iso under C:\ProgramData\OSDeployCore\boot. It prefers Default Switch, then the first available Hyper-V switch, and finally creates the VM without networking when no switch exists. It creates the VHDX in the Hyper-V host's default location, mounts the ISO, configures firmware and available TPM security, creates the checkpoint, opens VMConnect, and starts the VM.
A VM created with an empty DVD drive does not have OSDeploy boot media to start. Attach an ISO before starting or restarting the VM.
For sizing, media, networking, firmware, checkpoint, and startup examples, see New-OSDeployHyperVM. For compact syntax and parameter definitions, see the command reference.
Last updated
Was this helpful?

