Forum Discussion
Intune, winget, PowerShell
Hi,
Thanks for responding. You are correct. I've installed Microsoft.DesktopAppInstaller and its dependencies in an .msixbundle as a windows universal line of business app and made available to all, but still no luck.
I could run as user, but that would create a UAC popup nightmare.
I've looked into a different method but I'm concerned it may create too much of a security liability. How risky is it to write the script to use SYSTEM to create a dedicated local admin account to run winget instead? Deny local logon, RDP logon, and network logon and allow batch logon for security. I haven't tested this approach yet.
Thanks
Hi, take a look here. I was able to debug and test it, and it works just fine. Just update the paths based on your requirements or preferences, then create a Platform Script in Intune configured to run in the "System Context" and select "Run script in 64-bit PowerShell - Yes" Host, "Enforce script signature check - No"
https://github.com/FlyOnCloud/ms-entra-intune-scripts/blob/main/Win_CustomTask_Winget.ps1
Good luck!