Open PowerShell 5 using powershell.exe
.
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.