Last active
March 2, 2025 07:37
-
-
Save danpetitt/29338d557d72434c29670fa5d6413d5d to your computer and use it in GitHub Desktop.
Machine Setup using 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
Write-Host "Downloading and installing latest WinGet app..."; | |
# Find latest version of WinGet | |
$wingetrooturl = "https://github.com/microsoft/winget-cli/releases/"; | |
$wingetpage = "$($env:TEMP)\WinGet.html"; | |
Invoke-WebRequest -Uri $wingetrooturl -OutFile $wingetpage | |
# Locate first msix bundle link | |
[regex]$regex = "<a href=`".*?(download\/v[0-9]+\.[0-9]+\.[0-9]+\/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle)`" rel=`"nofollow`">"; | |
$res = select-string -Path $wingetpage -Pattern $regex -AllMatches | |
$downloadurl = "$($wingetrooturl)$($res.Matches[0].Groups[1].Value)"; | |
if( $downloadurl -eq $wingetrooturl ) { | |
Write-Host "Failed to find winget release link"; | |
Exit; | |
} | |
# Download and install winget bundle | |
$wingetsavedbundle = "$($env:TEMP)\WinGet.msixbundle"; | |
Invoke-WebRequest -Uri $downloadurl -OutFile $wingetsavedbundle | |
Add-AppxPackage $wingetsavedbundle | |
Write-Host "Installing listed apps..."; | |
( | |
# Internet tools | |
"Google.Chrome" | |
, "Mozilla.Firefox" | |
, "Microsoft.Edge" | |
, "Insomnia.Insomnia" # Postman like rest app | |
# General apps | |
, "AgileBits.1Password" | |
, "Microsoft.PowerToys" | |
, "Dropbox.Dropbox" | |
, "Microsoft.OneDrive" | |
, "RKibria.frhed" # binary file editor | |
, "Microsoft.WindowsTerminal" | |
, "Notepad++.Notepad++" | |
, "7zip.7zip" | |
, "ExpressVPN.ExpressVPN" | |
, "Adobe.Acrobat.Reader.64-bit" | |
, "Microsoft.PowerShell" | |
, "9NBHCS1LX4R0" # paint.net payable app | |
, "OpenWhisperSystems.Signal" # ultra secure chat app | |
# , "Microsoft.Teams" | |
# , "SlackTechnologies.Slack" | |
# Source control | |
, "Git.Git" | |
, "GitHub.GitLFS" | |
, "GitHub.cli" | |
, "Fork.Fork" | |
# Dev tools | |
, "Canonical.Ubuntu.2004" | |
, "Docker.DockerDesktop" | |
, "OpenJS.Nodejs" | |
, "Microsoft.WindowsTerminal" | |
, "Amazon.AWSCLI" | |
, "Microsoft.AzureStorageExplorer" | |
, "Microsoft.AzureStorageEmulator" | |
, "Microsoft.Bicep" | |
, "Microsoft.VisualStudioCode" | |
, "Microsoft.VisualStudio.2022.Community" | |
, "9WZDNCRDMDM3" # Nuget package explorer | |
, "PostgreSQL.pgAdmin" | |
) | foreach {winget install --exact --silent --accept-package-agreements --accept-source-agreements --id $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment