Set-WindowsImageExecutionPolicy
By default, WinPE has the PowerShell Execution Policy to Restricted. This can easily be changed

One thing to keep in mind that if you don't specify the Set-WindowsImageExecutionPolicy Path, it will apply to all mounted Windows Images
Mount-WindowsImageOSD -ImagePath "T:\WinPE\sources\boot.wim"
Set-WindowsImageExecutionPolicy Bypass
Dismount-WindowsImageOSD -Save
Copy link