OSDeploy / OSD

OSD Shared Functions
MIT License
130 stars 54 forks source link

OSD 24.2.20.1 WinPE ExecutionPolicy = Restricted #118

Closed skyblaster closed 4 months ago

skyblaster commented 4 months ago

On a freshly configured physical host running 10.0.22631.3155, I installed the latest ADK 10.1.25398.1 (September 2023) and WinPE add-on.

After creating a fresh OSDCloud WinPE and launching it with New-OSDCloudVM, the OSD module fails to load.

This appears to be due to powershell execution policy defaulting to Restricted instead of Bypass like in https://winpe.blob.core.windows.net/public/WinPE_Win11_22H2_ADK.iso

Screenshot 2024-03-02 143415

skyblaster commented 4 months ago

My current workaround is adding PowerShell -Nol -C Set-ExecutionPolicy Unrestricted in startnet.cmd

skyblaster commented 4 months ago

My fault. Nothing to see here. I had interrupted the first run of New-OSDCloudTemplate, which caused a mounting issue on the second run.

=========================================================================
2024-03-02-130620 Adding default en-US ADK Packages
Dism Function: Add-WindowsPackage
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\AMD64\WinPE_OCs\WinPE-WMI.cab
PS>TerminatingError(Add-WindowsPackage): "The specified image needs to be remounted.
Remount the Wim to make this image available for servicing.
"