To create a bootable WinPE ISO image:
- Download and install Windows 11 Assessment and Deployment Kit (ADK) and Windows 11 Assessment and Deployment Kit WinPE Add-on in a Windows virtual machine. Download LINK
- Create 4 directories in this virtual machine:
C:\test\winpe\ - used as working directory of WinPE.
C:\test\mount\ - used as the mount directory of WinPE image.
C:\test\drivers\ - (optional) contains the drivers files.
C:\test\scripts\ - contains the scripts. - Click "Start" -> "All apps" -> "Windows Kits", right-click "Deployment and Imaging Tools Environment" and select "Run as an administrator", execute below command to create a working directory containing base WinPE files:
copype amd64 C:\test\winpe - Execute this command to mount WinPE image in directory C:\test\mount\:
dism /Mount-Image /ImageFile:C:\test\winpe\media\sources\boot.wim /index:1 /MountDir:C:\test\mount\
- Prepare scripts and put them in this folder C:\test\scripts\, then copy scripts to below WinPE image mount path:
copy startnet.cmd C:\test\mount\Windows\System32\
copy deploy.cmd C:\test\mount\
copy CreatePartitions-UEFI.txt C:\test\mount\
copy Unattend.xml C:\test\mount\
- Create a WinPE startup script, named “startnet.cmd” : (Sample file attached to this article)
Note: To create the script:
-Open a new text editor (notepad).
-Copy and paste the script content into the notepad.
-Save as startnet.cmd
- Create a script to create disk partitions, apply Windows image, named “deploy.cmd”. Sample file (attached to this KB article)
- Create a DiskPart script to format and set up the hard disk partitions for Windows, see this LINK
For Example: copy and change the file of creating the System, MSR, Windows, and recovery tools partitions for UEFI-based PCs in above link, named “CreatePartitions-UEFI.txt”.
- (Optional) Create an unattend xml file for Windows OOBE configuration pass when booting to Windows at first time. Sample file (attached to this KB article)
- (Optional) Get VMware PVSCSI driver files. There are 2 methods to get PVSCSI driver files, then copy the driver files from C:\test\drivers\ to C:\test\mount\drivers\
- From VMware tools ISO package:
Download VMware tools ISO file from this
LINK . Mount VMware tools ISO in this virtual machine, if mounted drive is “
E:”, then copy PVSCSI driver files from this path
E:\Program Files\VMware\VMware Tools\Drivers\pvscsi\Win10\amd64\ to C:\test\drivers\
- From Microsoft Update Catalog:
Download VMware tools driver from
Microsoft Update Catalog . Expand downloaded “
.cab” file by executing this command:
expand C:\xxxx.cab -F:* C:\test\drivers\
- (Optional) Add VMware PVSCSI driver or other drivers to WinPE image by executing this command:
dism /image:C:\test\mount\ /add-driver /driver:C:\test\drivers\ /Recurse - (Optional) You can also do other customizations on WinPE image.
- Commit the changes and unmount the image, then create the WinPE ISO file:
dism /Unmount-Image /MountDir:C:\test\mount /Commit
MakeWinPEMedia /ISO C:\test\winpe C:\test\WinPE_amd64.iso
To deploy and install a new Windows 11 virtual machine:
- Create a new virtual machine by selecting “Microsoft Windows 10 (64bit)” as guest OS type and without vTPM device, change VM settings to meet Windows 11 CPU, memory, storage, firmware requirements when necessary, add 2 CD/DVD drives and preferred virtual devices.
- Connect generated WinPE ISO “WinPE_amd64.iso” above to the 1st CD/DVD, connect Windows 11 installation ISO image to the 2nd CD/DVD.
- Launch virtual machine remote console, power on the virtual machine, press any key when prompting “Press any key to boot from CD or DVD…”, it will boot to WinPE and execute startup script.
- In sample script “deploy.cmd”, it will prompt you to select the index of OS Edition in Windows installation ISO image, input the OS Edition index and press Enter. OS image will be applied to Windows partition.
- After reboot, OS starts country or region, keyboard layout, sign in configurations if you do not use unattend xml answer file.