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
Most of these scripts were initially built with PowerShell 5 and do not work with PowerShell 7 as-is.
If you find yourself working through this, two key changes you need to make:
Fix the header in UploadAzureStorageChunk to specify the content type as follows:
$headers = @{
"x-ms-blob-type" = "BlockBlob"
"Content-Type" = "text/plain; charset=iso-8859-1"
};
Most of these scripts were initially built with PowerShell 5 and do not work with PowerShell 7 as-is.
If you find yourself working through this, two key changes you need to make:
$headers = @{
"x-ms-blob-type" = "BlockBlob"
"Content-Type" = "text/plain; charset=iso-8859-1"
};
More detail on this problem covered here: Add-IntuneWin32App.ps1 'CommitFile' failed error with PowerShell 7.4.0 · Issue #128 · MSEndpointMgr/IntuneWin32App (github.com)
try
{
$headers = @{
"Content-Type" = "application/json"
};
Invoke-RestMethod $uri -Method Put -Body $xml -Headers $headers; }
catch
{
Write-Host -ForegroundColor Red $request;
Write-Host -ForegroundColor Red $_.Exception.Message;
throw;
}
The text was updated successfully, but these errors were encountered: