- PowerShell 99%
- Batchfile 1%
| .forgejo | ||
| Modules | ||
| Skript | ||
| Utility | ||
| .gitignore | ||
| AI-ENTRYPOINT.md | ||
| bcd-cleaner.bat | ||
| create-bcd-entry.bat | ||
| LICENSE | ||
| README.md | ||
| start.bat | ||
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.