tabs-not-spaces / Intune.USB.Creator

A module containing tools to assist with the creation of a bootable WinPE USB used to provision devices for enrollment to Intune.
GNU General Public License v3.0
131 stars 43 forks source link

Warning message every time i build the USB... #8

Closed Ezmoshow closed 4 years ago

Ezmoshow commented 4 years ago

I am now getting a warning every time i try to build the USB.. just started happening a few days ago..

Grabbing PWSH 7.. VERBOSE: Destination: I:\scripts\pwsh VERBOSE: About to download package from 'https://pscoretestdata.blob.core.windows.net/v7-1-0-daily-20200709/PowerShell-7.1.0-daily.20200709-win-x64.zip' WARNING: Response status code does not indicate success: 404 (The specified resource does not exist.).

Seems like w/o this part working, the USB is a dud...

Is this happening to anyone else?

any suggestions on a fix?

Thanks!

Ezmoshow commented 4 years ago

Looks like it just going out to grab the install-powershell.ps1 script and running the daily build from that. I just had to manually pull that myself, and copied the bits over to the USB. Got a functioning USB now!

enroll-bacon commented 4 years ago

Had the same error, installed the latest powershell build, then copied that to D:\Scripts\pwsh USB works again now

tabs-not-spaces commented 4 years ago

this is happening because the script is pulling the daily build of PWSH7 which currently has the MSI pulled for build issues.

image

Should be a simple fix - just omit the -Daily parameter from line 82 of Publish-ImageToUSB.ps1

https://github.com/tabs-not-spaces/Intune.USB.Creator/blob/931eb95e62c3690cb492330bd6d020d6e26cc52c/Intune.USB.Creator/Public/Publish-ImageToUSB.ps1#L82

Changes to:

. $env:Temp\install-powershell.ps1 -Destination "$($usb.drive):\scripts\pwsh" 

If anyone felt like making a contribution but didn't know where to start, this would be it.