Skip to content

Instantly share code, notes, and snippets.

@milnak
Last active August 14, 2024 19:38
Show Gist options
  • Save milnak/bdb92409c79711136ace6c93fda97139 to your computer and use it in GitHub Desktop.
Save milnak/bdb92409c79711136ace6c93fda97139 to your computer and use it in GitHub Desktop.
Install Scoop in Windows Sandbox

Install Scoop in Windows Sandbox

Open PowerShell 5 using powershell.exe.

Install winget, PowerShell v7, Scoop

cd ~/Downloads
$ProgressPreference = 'SilentlyContinue' # Speed up download
$hash = [ordered]@{
    'https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx'='Microsoft.UI.Xaml.2.8.x64.appx'
    'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'='Microsoft.VCLibs.x64.14.00.Desktop.appx'
    'https://aka.ms/getwinget'='Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
}
$hash.GetEnumerator()  | ForEach-Object {
    Invoke-WebRequest -Uri $_.Key -OutFile $_.Value -Verbose
    Add-AppxPackage $_.Value -Verbose
}
winget install --id Microsoft.Powershell --source winget
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force

Open PowerShell 7 using pwsh.exe.

Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop install git

Now use scoop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment