install command (winget)

The install command of the winget tool installs the specified application. Use the search command to identify the application you want to install.

The install command requires that you specify the exact string to install. If there is any ambiguity, you will be prompted to further filter the install command to an exact application.

Usage

winget install [[-q] \<query>] [\<options>]

search command

Arguments

The following arguments are available.

ArgumentDescription
-q,–queryThe query used to search for an app.
-?, –helpGet additional help on this command.

 Note

The query argument is positional. Wild-card style syntax is not supported. This is most often the string of characters you expect to uniquely identify the package you wish to install.

Options

The options allow you to customize the install experience to meet your needs.

OptionDescription
-m, –manifestMust be followed by the path to the manifest (YAML) file. You can use the manifest to run the install experience from a local YAML file.
–idLimits the install to the ID of the application.
–nameLimits the search to the name of the application.
–monikerLimits the search to the moniker listed for the application.
-v, –versionEnables you to specify an exact version to install. If not specified, latest will install the highest versioned application.
-s, –sourceRestricts the search to the source name provided. Must be followed by the source name.
–scopeAllows you to specify if the installer should target user or machine scope.
-a, –architectureSelect the architecture to install.
-e, –exactUses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring.
-i, –interactiveRuns the installer in interactive mode. The default experience shows installer progress.
-h, –silentRuns the installer in silent mode. This suppresses all UI. The default experience shows installer progress.
–localeSpecifies which locale to use (BCP47 format).
-o, –logDirects the logging to a log file. You must provide a path to a file that you have the write rights to.
–overrideA string that will be passed directly to the installer.
-l, –locationLocation to install to (if supported).
–forceOverrides the installer hash check. Not recommended.
–accept-package-agreementsUsed to accept the license agreement, and avoid the prompt.
–accept-source-agreementsUsed to accept the source license agreement, and avoid the prompt.
–headerOptional Windows-Package-Manager REST source HTTP header.
-r, –renameThe value to rename the executable file (portable)
–verbose-logsUsed to override the logging setting and create a verbose log.
Scroll to top