Skip to content

Instantly share code, notes, and snippets.

@eplord
Forked from danpetitt/machine-setup.ps1
Created March 2, 2025 07:37
Show Gist options
  • Save eplord/685f9c2c890561e2979e1cd0f64f8da7 to your computer and use it in GitHub Desktop.
Save eplord/685f9c2c890561e2979e1cd0f64f8da7 to your computer and use it in GitHub Desktop.
Machine Setup using WinGet
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