You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I need to store the Script we'd like to run during OSDCloud on a Microsoft Blob Storage. For that, I uploaded the script and created a (ReadOnly) SAS URL. This does not work for me, for 2 reasons:
A blob storage SAS URL contains & and % characters. Since this is applied to the startnet.cmd the classic batch rules apply and those characters need to be escaped. % to %% and & to ^&. But that's something I can work around from my side when I pass the URL to Edit-OSDCloudWinPE.
A more strange behaviour happens when Invoke-WebPSScript is called. The verbose output shows the URL seemingly correct to me (unless my eyes play tricks on me), but PowerShell just closes without executing the script. I tested a bit and noticed that I run into the empty return when Test-WebConnection is checking the URL, because its $false. But manually executing Test-WebConnection with my URL returned true. When I change the type of the parameter in the function Invoke-WebPSScript from [system.uri] to [string] it magically works. Which seems quite strange to me, since Test-Webconnection also changes the type to [system.uri].
The text was updated successfully, but these errors were encountered:
Problem number 2 sounds like it's likely caused by issue #168, which has been reverted in the repo and should be included in the next release.
In the meantime, you can either manually update your copy of the OSD module with the new version of Invoke-WebPSScript.ps1, or you can fix the issue by changing the 'CONTENT-TYPE' property of the blob in Azure from the default (application/octet-stream) to 'text/plain'.
As @joebartlett94 says your second issue should be solved now.
For the first one, please try to avoid using white and/or special characters in the URL.
Hi,
I need to store the Script we'd like to run during OSDCloud on a Microsoft Blob Storage. For that, I uploaded the script and created a (ReadOnly) SAS URL. This does not work for me, for 2 reasons:
A blob storage SAS URL contains & and % characters. Since this is applied to the startnet.cmd the classic batch rules apply and those characters need to be escaped. % to %% and & to ^&. But that's something I can work around from my side when I pass the URL to Edit-OSDCloudWinPE.
A more strange behaviour happens when Invoke-WebPSScript is called. The verbose output shows the URL seemingly correct to me (unless my eyes play tricks on me), but PowerShell just closes without executing the script. I tested a bit and noticed that I run into the empty return when Test-WebConnection is checking the URL, because its $false. But manually executing Test-WebConnection with my URL returned true. When I change the type of the parameter in the function Invoke-WebPSScript from [system.uri] to [string] it magically works. Which seems quite strange to me, since Test-Webconnection also changes the type to [system.uri].
The text was updated successfully, but these errors were encountered: