Last active
February 11, 2025 15:16
-
-
Save bluntspoon/d3c73088b2d9fd33033a8e8cef2296e8 to your computer and use it in GitHub Desktop.
Basic Dev 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
#Install WinGet | |
Write-Host "-=Installing WinGet=-" -ForegroundColor Black -BackgroundColor White | |
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller' | |
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") { | |
Add-AppxPackage -Path 'https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle' | |
Write-Host "WinGet is installed" -ForegroundColor Green | |
} | |
else { | |
Write-Host "WinGet is already installed" -ForegroundColor Green | |
} | |
#Install Apps | |
Write-Host "-=Installing Apps=-" -ForegroundColor Black -BackgroundColor White | |
$apps = @( | |
@{id = "Microsoft.WindowsTerminal"; source = "winget" } | |
@{id = "JanDeDobbeleer.OhMyPosh"; source = "winget" } | |
@{id = "Microsoft.VisualStudioCode"; source = "winget" } | |
@{id = "Microsoft.VisualStudio.2022.Professional"; source = "winget" } | |
@{id = "Microsoft.AzureCLI"; source = "winget" } | |
@{id = "Microsoft.AzureDataStudio"; source = "winget" } | |
@{id = "Microsoft.AzureStorageExplorer"; source = "winget" } | |
@{id = "Microsoft.PowerShell"; source = "winget" } | |
@{id = "Microsoft.PowerToys"; source = "winget" } | |
@{id = "Git.Git"; source = "winget" } | |
@{id = "GitHub.cli"; source = "winget" } | |
@{id = "Docker.DockerDesktop"; source = "winget" } | |
@{id = "Microsoft.DotNet.SDK.8"; source = "winget" } | |
@{id = "Microsoft.DotNet.SDK.9"; source = "winget" } | |
); | |
Foreach ($app in $apps) { | |
$listApp = winget list --exact -q $app.id | |
if (![String]::Join("", $listApp).Contains($app.id)) { | |
Write-Host "Installing:" $app.id -ForegroundColor Green | |
if ($null -ne $app.source) { | |
winget install --exact --silent --id $app.id --source $app.source | |
} | |
else { | |
winget install --exact --silent --id $app.id | |
} | |
} | |
else { | |
Write-Host "Already Installed (will try upgrade): " $app.id -ForegroundColor Yellow | |
winget upgrade --silent --id $app.id --source $app.source | |
} | |
} | |
Write-Host "-=Installation & Upgrades Complete =-" -ForegroundColor Black -BackgroundColor White |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
0x8a15005e : The server certificate did not match any of the expected values.
winget settings --enable BypassCertificatePinningForMicrosoftStore