Skip to content

winget🔗

Windows Package Manager CLI (aka winget) can be used to install/upgrade software on Windows via the command line.

Install🔗

Download latest version from GitHub release page.

Info

The download a package with all dependencies you can use https://store.rg-adguard.net/.

Now you will see all packages inside this application.

Install winget as a provisioned package:

PS> Add-AppxProvisionedPackage
        -PackagePath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
        -LicensePath '7bcb1a0ab33340daa57fa5b81faec616_License1.xml'
        -DependencyPackagePath
            'Microsoft.VCLibs.x64.14.00.Desktop.appx',
            'Microsoft.UI.Xaml.2.7_7.2208.15002.0_x64__8wekyb3d8bbwe.appx'
        -Online

Enable provisioned package for the current user:

(Get-AppxProvisionedPackage -Online |
   Where-Object -Property DisplayName -EQ Microsoft.DesktopAppInstaller
).InstallLocation | Add-AppxPackage -Register -DisableDevelopmentMode

The executable winget.exe is than found in $env:USERPROFILE\AppData\Local\Microsoft\WindowsApps\.

Warning

If there are policies that does not allow Microsoft applications, the application Microsoft.DesktopAppInstaller must be whitelisted.

Searching for Packages🔗

List all available packages:

PS> winget search

Can also be seen at microsoft/winget-pkgs.

List all packages that contains note:

PS> winget search note

Display information about a package:

PS> winget show notepad++

Installing a Package🔗

Try to install all packages in machine scope (for all users):

PS> winget install --scope machine --exact --id gerardog.gsudo

Therefore, the default scope should be machine. Change the default scope in the settings

Some package can not be installed in machine scope:

PS> winget install --scope user --exact --id Microsoft.WindowsTerminal

Listing Package Repositories🔗

PS> winget source list

Upgrading Packages🔗

To get a list of upgradeable packages:

PS> winget upgrade

To upgrade a package:

PS> winget upgrade Notepad++.Notepad++

Configuration Settings🔗

To open the settings in an editor:

PS> winget settings

The settings (documentation on these settings):

{
    "$schema": "https://aka.ms/winget-settings.schema.json",

    "visual": {
        "progressBar": "rainbow"
    },
    "installBehavior": {
        "preferences": {
            "scope": "machine"
        }
    },
    "source": {
        "autoUpdateIntervalInMinutes": 5
    }
}
  • progressBar: accent or rainbow
  • scope: user or machine