microsoftgraph / powershell-intune-samples

This repository of PowerShell sample scripts show how to access Intune service resources. They demonstrate this by making HTTPS RESTful API requests to the Microsoft Graph API from PowerShell.
MIT License
1.36k stars 657 forks source link

Win32 application add bug with PowerShell 7.4.5 #279

Open KG-droid opened 1 month ago

KG-droid commented 1 month ago

Hi all, I think I may have found a bug, when using the Win32_Application_Add.ps1 when uploading the file content for a new win32 app in intune. Specially after alot of testing the issue appears to be related to the Invoke-WebRequest upon uploading the chunks to Azure. Whenever I try to commit the encryption info after the file content upload, I just get commitFileFailed with no further details. But yet this same script works perfectly fine on powershell 7.3.12. Even more weird is that I can upload all the chunks, commit the block list and then download what I've just committed from Azure, and it downloads a working intunewin file that I can decrypt, but yet intune still isn't happy with it apparently. Another thing I've tested too is using the InFile switch with Invoke-RestMethod to upload the file directly rather than in chunks and that works fine, so it appears there is something weird going on when uploading via the body switch with chunks.

Is anyone else experiencing this?

Cheers Keir