Automated creation of bootable Windows 11 VHDX files with native-boot and VM compatibility.
  • PowerShell 99%
  • Batchfile 1%
Find a file
skr 5af79deb46
All checks were successful
CI / lint (push) Successful in 17s
CI / test (push) Successful in 8s
CI / release (push) Has been skipped
fix: rename $args to $psArgs (PSAvoidAssignmentToAutomaticVariable)
2026-05-08 12:49:02 +00:00
.forgejo chore: align with nm visitenkarte standard 2026-05-08 10:21:51 +00:00
Modules bugfix: fehlende methode umgangen 2025-08-14 20:41:43 +02:00
Skript fix: rename $args to $psArgs (PSAvoidAssignmentToAutomaticVariable) 2026-05-08 12:49:02 +00:00
Utility fix: rename $args to $psArgs (PSAvoidAssignmentToAutomaticVariable) 2026-05-08 12:49:02 +00:00
.gitignore chore: align with nm visitenkarte standard 2026-05-08 10:21:51 +00:00
AI-ENTRYPOINT.md Aktualisierung & Cleanup 2025-08-13 12:32:52 +02:00
bcd-cleaner.bat neu strukturiert 2025-08-13 12:38:51 +02:00
create-bcd-entry.bat neu strukturiert 2025-08-13 12:38:51 +02:00
LICENSE chore: align with nm visitenkarte standard 2026-05-08 10:21:51 +00:00
README.md chore: align with nm visitenkarte standard 2026-05-08 10:21:51 +00:00
start.bat neu strukturiert 2025-08-13 12:38:51 +02:00

win11-vhdx-creator

Automated creation of bootable Windows 11 VHDX files. Supports both native boot and VM compatibility, with automatic driver injection and BCD entries.

Features

  • One universal script for both native boot and VM-compatible images
  • Automatic UAC elevation and PowerShell 7 switch from Windows PowerShell 5
  • Driver export and injection from the running host (NVMe, SCSI, USB, network)
  • Bootloader entries created and validated automatically
  • Interactive step-by-step UI with back-navigation and final confirmation
  • Modular architecture (UI, system, drivers, boot)

Quick Start

Mount a Windows 11 ISO, then double-click start.bat or run from an admin PowerShell:

.\Skript\CreateWin11VHDX.ps1                                    # native boot only
.\Skript\CreateWin11VHDX.ps1 -VMCompatible                      # native + VM
.\Skript\CreateWin11VHDX.ps1 -VHDXPath D:\VMs\Win11.vhdx -SizeGB 120 -VMCompatible

Pre-built ZIPs are attached to each release.

Requirements

  • Windows 11 with Hyper-V enabled
  • PowerShell 7 (the script auto-switches from PS5 if needed)
  • A mounted Windows 11 ISO or a reachable install.wim
  • At least 60 GB free disk space
  • Local administrator rights (auto-requested)

Parameters

Parameter Default Description
-VHDXPath C:\VHDX\Windows11.vhdx Output path of the VHDX file
-SizeGB 100 VHDX size in GB (minimum 60)
-TargetDrive W Drive letter mounted during installation
-VMCompatible false Switch to UEFI partitioning (EFI + MSR + Windows) for VM compatibility

In VM-compatible mode the script lays out a full UEFI GPT layout (260 MB EFI / 128 MB MSR / NTFS), installs the UEFI bootloader, and additionally registers a native-boot entry. In standard mode the script reuses the host EFI partition with a single NTFS partition.

Layout

win11-vhdx-creator/
├── start.bat                          # Double-click launcher
├── Skript/
│   └── CreateWin11VHDX.ps1            # Universal main script
├── Modules/
│   ├── VHDX-Creator-UI.psm1
│   ├── VHDX-Creator-System.psm1
│   ├── VHDX-Creator-Drivers.psm1
│   └── VHDX-Creator-Boot.psm1
└── Utility/
    ├── BCD-Cleanup.ps1                # Remove stale boot entries
    └── Create-BCDEntry.ps1            # Add a boot entry to an existing VHDX

Utilities

  • Utility\BCD-Cleanup.ps1 — interactive cleanup of stale Windows Boot Manager entries.
  • Utility\Create-BCDEntry.ps1 — add a native-boot entry for an existing VHDX.

Each utility has a .bat wrapper at the repository root for double-click usage.

Development

PowerShell scripts are linted with PSScriptAnalyzer and syntax-checked on every push (see .forgejo/workflows/ci.yml). Functional testing requires a Windows host with Hyper-V — CI cannot exercise the actual VHDX creation path.

License

MIT — © 2026 NeoMINT Research


Built by NeoMINT.