Skip to content

Instantly share code, notes, and snippets.

@jNizM
Created June 24, 2022 13:18
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 jNizM/6ea29c7a4cede86db7598a1f9c1eec5e to your computer and use it in GitHub Desktop.
Save jNizM/6ea29c7a4cede86db7598a1f9c1eec5e to your computer and use it in GitHub Desktop.
Install and upgrade / update apps with winget
$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