Skip to content

Instantly share code, notes, and snippets.

@Erisa
Created May 30, 2020 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Erisa/14e9dafe17657c692f2d935da43ecf44 to your computer and use it in GitHub Desktop.
Save Erisa/14e9dafe17657c692f2d935da43ecf44 to your computer and use it in GitHub Desktop.
wgi: install multiple winget packages at once
$numOfArgs = $args.Length
for ($i=1; $i -le $numOfArgs; $i++)
{
$target = $($args[$i-1])
write-host "Trying: $($target)"
winget install $args[$i-1]
write-host "Finished trying: $($target)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment