Open ricke65 opened 1 year ago
To reframe what I'm trying to do - what I want is to be able to use winget to install software, without giving people local admin rights.
Ideally, I would put apps in Intune Company Portal, but most of what I want is not in the MS Store repository (but a lot is in the Community Repository), and thus winget is unhelpful it seems
You might want to take a look at:
@denelon This is great! I have managed to get winget working today. I installed PowerShell 7.3.5, then installed the winget Powershell module, and (re)installed winget from the elevated PowerShell session, and now it works!
Now we just need integration of the Community Repository with Intune...
@ricke65 Can you elaborate on how you were able to elevate winget.exe
through EPM?
Brief description of your issue
I am running Powershell as Admin, which I launched by using Intune Endpoint Privilege Manager (EPM). I am trying to run winget and it is not working.
Steps to reproduce
I open a Powershell Administrator session, by using the 'Run with Elevated Access' feature of Intune EPM
When I then run winget.exe it gives an error
Expected behavior
winget runs normally, with Administrator privilege (because it was run with an elevated PowerShell session) and allows me to install/manage packages
Actual behavior
When I then try to run winget.exe it fails; when I first try to run it is unable to recognize the cmdlet. When I change to the location of winget.exe the error is different.
unable to recognize the cmdlet
When I change to the path where winget.exe is located, I get an access denied / NativeCommandFailed error:
Environment