For those who don’t know, my name’s Mitch and I’m one of the developers for PSAppDeployToolkit, and worked extensively on v4.
It’s not lost on us that a lot of people are after robust WinGet support within PSAppDeployToolkit. While such functionality is not within the spirit of PSAppDeployToolkit itself, it certainly is within an extension.
So today, I announce PSAppDeployToolkit.WinGet, which I’m releasing as 1.0.0-rc1. This has been tested extensively by myself, as well as others within the PSAppDeployToolkit team and I believe it’s now ready for public testing.
GitHub: GitHub - mjr4077au/PSAppDeployToolkit.WinGet: A PSAppDeployToolkit v4 extension module for WinGet.
PSGallery: PowerShell Gallery | PSAppDeployToolkit.WinGet 1.0.0-rc1
The design of this module has been performed to as closely match the API of Microsoft.WinGet.Client as much as possible. This makes it a drop-in replacement for Microsoft’s module, however it properly allows application installs while running as SYSTEM, as well as hooks PSAppDeployToolkit’s logging, etc.
If there’s any questions, I’ll be here, on GitHub, or on the WinAdmins Discord server to answer them.
4 Likes
Hey Mitch,
I appreciate your work. I tried winget and failed to run it in the system context. I’m curious to see if it works with your module/extension.
In the documentation for the module I read: “Copy the PSAppDeployToolkit.WinGet folder into your deployment script directory for Invoke-AppDeployToolkit.ps1 to automatically import.”
So my directory should look like this?
I was also wondering, do I have the option to customize the base so that extensions are included in each new package?
I’ve already searched the docs and forum but haven’t really found an answer yet.
If I put in anywhere in the base, i can’t create a new package because of the signage.
Where do i have to put it, to have it as default?
Aside from PSADT logging integration, this is precisely why my module exists. It even has a Repair-ADTWinGetPackageManager function to update WinGet, ensure Visual Studio Runtimes are installed, etc.
That looks pretty good to me. Its worth mentioning that you can’t really take some other module, slap PSAppDeployToolkit. on the front of it and all of a sudden its a PSADT extension. I doubt Evergreen will load like this because its psd1/psm1 files aren’t renamed also etc.
If you need to import non-PSADT modules into your PSADT environment, you should add the necessary Import-Module calls yourself.
This isn’t something we’ve thought about or considered, but if you’d love to chuck it up as a feature request on GitHub, we’ll be able to explore it as I can see the benefits for when you’re setting up an app packaging factory, etc. Sign in to GitHub · GitHub
Hi @mjr4077au,
first of all thank you for this extension - it makes stuff a lot easier!
We are testing your Winget Extension in combination with ServiceUI and Intune and are currently facing a problem with forcing silent installations. It looks like the Installer of the application is always visable for the end user, if we do not directly pass a silent switch to the installer by using the override parameter.
For app installations, we are using it like this which results in the installer being visable for the user because of the ServiceUI.exe:
Install-ADTWinGetPackage -Id $AppID
We could use the override parameter to directly pass it to the installer - this works!
Install-ADTWinGetPackage -Id $AppID -Override "/VERYSILENT"
I am think if there is another solution, e.g. something like --silent winget uses? Looking up the switches for the silent installations for every Installer is quit a hassle. Also using the Mode (Silent) parameter results in INVALID_CL_ARGUMENTS.
You’ll need to pass -Mode Silent through to the function:
[Parameter(Mandatory = $false)]
[ValidateSet('Silent', 'Interactive')]
[System.String]$Mode,
Ah, just saw this… This actually appears to be a bug, I’m onto it now.
EDIT: PSAppDeployToolkit.WinGet 1.0.1 has now been released which addresses that --silent issue, among some other PowerShell 7 nonsense.
3 Likes
Hi thanks a lot for the extension
I have downloaded unpacked and places in PSADT folder, but it does not seem to load via VSCODE when i run whole script, when i try to load it via import-module and point to psd1 it says
Import-Module: The required module ‘PSAppDeployToolkit’ is not loaded. Load the module or remove the module from ‘RequiredModules’ in the file ‘C:\Users\user\test\PSADT-v4.0.6 (64-bit) EN-WINGETv1.0.4\PSAppDeployToolkit.WinGet.psd1’.
So, how do I load it so i am able to resolve or show IntelliSense for supported install-adtWingetpackage ???
Edited
ok I can see I need to do this in VScode:
Import-Module “C:\Users\user\test\PSADT-v4.0.6 (64-bit) EN-WINGETv1.0.4\PSAppDeployToolkit\PSAppDeployToolkit.psd1” -Force
Import-Module “C:\Users\user\test\PSADT-v4.0.6 (64-bit) EN-WINGETv1.0.4\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psd1” -Force
then they are loaded, is there any other smart way to load all of it so I don’t need to point to the files when editing the main script: Invoke-AppDeployToolkit.ps1?
when I run PSADTv4 as admin
it fails to execute: Install-ADTWinGetPackage -Id “Git.Git”
says no package found matching input criteria
Thank you in advance! your work is greatly appreciated!