Created
June 24, 2022 13:18
-
-
Save jNizM/6ea29c7a4cede86db7598a1f9c1eec5e to your computer and use it in GitHub Desktop.
Install and upgrade / update apps with winget
This file contains 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
$apps = @( | |
@{name = "7zip.7zip" }, | |
@{name = "BraveSoftware.BraveBrowser" }, | |
@{name = "Discord.Discord" }, | |
@{name = "Lexikos.AutoHotkey" }, | |
@{name = "Microsoft.PowerShell" }, | |
@{name = "Microsoft.PowerToys" }, | |
@{name = "Mozilla.Firefox" }, | |
@{name = "Notepad++.Notepad++" }, | |
@{name = "Spotify.Spotify" }, | |
@{name = "Valve.Steam" }, | |
@{name = "VideoLAN.VLC" } | |
); | |
Foreach ($app in $apps) { | |
$list = winget list --exact -q $app.name | |
if (![String]::Join("", $list).Contains($app.name)) { | |
Write-host "Installing " $app.name | |
winget install -e -h --accept-source-agreements --accept-package-agreements --id $app.name | |
} | |
} | |
Write-Output "Updating Apps" | |
winget upgrade --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment