Last active
November 2, 2022 20:31
-
-
Save pl0xyelit/5417a15da5ead55b8506170c305f2500 to your computer and use it in GitHub Desktop.
wg - a PowerShell function wrapper for winget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$packageFile = Get-Content -Path "D:\PowerShell\packages.txt" | |
function wg { | |
param | |
( | |
[ValidateSet("upgrade","install", "uninstall")] | |
$type, | |
$packages = $packageFile | |
) | |
$packages | ForEach-Object { winget $type $_ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment