Hello,
I’d really like to use the winget module.
GitHub - mjr4077au/PSAppDeployToolkit.WinGet: A PSAppDeployToolkit v4 extension module for WinGet.
The setup details just aren’t enough for me to understand if I need to do more for setup.
So far, I’ve just pasted the files in the folder. No idea how to use it or how to ensure it works.
I don’t really understand how I’m supposed to load the modules for this stuff. Details on the site do not exist.
I have the module working now. But it seems to only work outside of Intune.
Should winget be working in Intune?
I see forum articles going back 2 years now with a promise of Intune and WinGet.
Perhaps it is this Admin elevation thing where winget doesn’t install as Admin.
It is really hard to get details on it.
If you follow the instructions as described, it will get imported into the session automatically.
If in doubt, why not just find out for real by logging what modules are in your session before you use a command from the winget module:
get-module | out-string | Write-ADTLogEntry
Hello,
Yes, I mentioned I got it working.
It works fine if I run it manually.
It doesn’t run when in Intune.
I will need to write logs out.
Also thanks for the details on this.
get-module | out-string | Write-ADTLogEntry
In my readme, you’ll note the first thing I show is the “repair” function: GitHub - mjr4077au/PSAppDeployToolkit.WinGet: A PSAppDeployToolkit v4 extension module for WinGet.
If you’re not doing this first, you’re going to want to as new Windows devices ship with very old WinGet versions. The repair function will ensure WinGet is installed, up to date, and has the necessary Microsoft Visual C++ Runtime libraries installed for you.
Make sure you Unblock-Files before wrapping for Intune. I always do Get-ChildItem .\ -Recurse | % { Unblock-File $_.FullName -Force}
from the root of the toolkit folder.
Hello and thank you for your response.
I had not realized I needed to keep the Repair-ADTWinGetPackageManager.
I have added it back.
I added it to the Pre-install.
I will give it a test.
Hello Tim,
Can you tell me what you mean by Root?
It’s the parent folder of all the folders of your package.
for example, Invoke-AppDeployToolkit.ps1
is in the root folder of the toolkit folders.
Well yes, but your suggestion is vague.
You do Get-ChildItem .\ -Recurse | % { Unblock-File $_.FullName -Force} but where?
Root is the file.. okay it’s Invoke-AppDeployToolkit.ps1
But hey that’s a script and it’s long and so WHERE would you put this? At the beginning? In the pre section?
The app still fails to do WinGet. Bummer.
Could it be the way I’m attempting to run it from Intune?
I have it assigned to Device group.
The main problem here is you’re just saying “The app still fails to do WinGet” without any further context, info, logs, or anything. I’ve got a better chance of predicting the return of Jesus than anyone here has of helping you without info.
Hello,
Yes I totally agree.
Apparently I can’t get a log to write either. So it’s all fun currently…
I’m still learning how to use the toolkit.
Also, apparently there are quirks with Winget so when I try things sometimes it doesn’t work.
Admin elevation is one of those things.
All of the WinGet code in my module is battle-tested and has been put through its paces on many systems in many clients.
For your issue here where you’re not even getting a log, I’d recommend enabling global PowerShell transcription so you can see what’s happening within PowerShell and maybe get some insights:
If something’s wrong, such as a badly formatted script, anything really, it’ll be logged to the directory you specify here. You can either do this on your Intune device via a configuration profile or locally via gpedit.msc
.
1 Like