I decided to rewrite my USB boot media to a PowerShell script. When mounting I use the following
Mount-WindowsImage -ImagePath X:\DEV.wim -Index 1 -Path "C:\windows"
The .WIM is on a separate partition on the boot USB. When called, PowerShell can't see that partition. I am guessing because I am not "working" on that disk.
Is there a way to tell that command to mount a .wim from a separate partition to the disk I am working on?
Example:
Mount-WindowsImage -DiskNumber 0 -ImagePath I:\DEV.wim -Index 1 -DiskNumber 1 -Path "C:\windows"
For adding powershell support in your WinPE boot media you need to attach some
.cab
files.First you need to mount your wim and add a few packages to your
boot.wim
file.The location for the optional components are as follows for x64 bit.
32bit optional components are located here:
You can run this script to add the packages you need to use powershell in WinPE.
Then you will need to recreate your boot media: