Windows upgrade or Upgrade for short are a update script written in powershell. The script look for your package managers including WSL ones and update them.
To run the script make sure your PS1 file is placed in a location in your path and that you are allowed to run scripts.
To run the script make sure the script location is placed in your windows $PATH
variable. (For a real terminal super user feeling.) But you can also just run the script.
The script can detect:
- Windows Subsystem for Linux (WSL)
- PSWindowsUpdate (Powershell Module)
- Scoop
- Chocolatey
- WinGet (Windows Package Manager)
PS > upgrade --help
Usage: upgrade [-w] [-su] [-v] [-help]
-h, --help Show this help
-w, --noWindowsUpdate Disable update check for windows
-su, --suMode Disable suMode and require sudo password on a user level for wsl update. This may lead to required confirms.
--updateWSL Upgrade WSL client
-v, --version Show current version
Note! When using a sudo windows script i recommend you using lukesampson sudo simply run scoop install sudo
.
- Create a
.bin
directory in your home directory and make sure it added to your$PATH
environment variable.PS> New-Item -itemtype "directory" -path "$env:userprofile\.bin" -Force PS> [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:userprofile\.bin", "User")
- Download latest release (Can be found here)
PS> $version=(irm 'https://api.github.com/repos/AndreasBrostrom/win-upgrade/releases/latest' | Select tag_name).tag_name PS> iwr -URI "https://github.com/AndreasBrostrom/win-upgrade/releases/download/$version/upgrade-$version.zip" -OutFile "$env:userprofile/Downloads/upgrade-latest.zip"
- Unzip latest release
PS> Expand-Archive "$env:userprofile\Downloads\upgrade-latest.zip" -DestinationPath "$env:userprofile\.bin" PS> Remove-Item "$env:userprofile\.bin\README.md"
- Run
PS> upgrade