01-05-2023 01:48 AM - edited 01-05-2023 01:50 AM
You might remember my previous post about installing Winget in the SystemContext here.
The recent Winget-version 1.4.3531 comes with a PowerShell-Module which gives you the following functions:
Get-WinGetVersion Enable-WinGetSetting Disable-WinGetSetting Add-WinGetSource Remove-WinGetSource Reset-WinGetSource Find-WinGetPackage Get-WinGetPackage Get-WinGetSource Install-WinGetPackage Uninstall-WinGetPackage Update-WinGetPackage
Once installed, depending on your installation path, you can import the module by using - as usual:
Import-Module <Path to Microsoft.WinGet.Client.psd1
This new capability can make the overall handling of packages via WinGet within JumpCloud-Commands a bit more straight forward.
For example, this could be wrapped in a Command which runs 'after agent install' on a newly enrolled device and helps you to do a bulk install of applications.
P.S.: an updated version of my previous script can be found here. It pulls this RC from Github during the installation.
01-26-2023 06:01 PM
Thanks for posting the update! I hope this powershell module is released for GA soon. This would make is so much easier to work with powershell in our scripts.
New to the site? Take a look at these additional resources:
Ready to join us? You can register here.