Syntax
Description
TheInstall-WinGetPackage cmdlet installs a package from a configured source or from a package object passed through the pipeline. You can specify packages by ID, name, moniker, or by passing a package object from Find-WinGetPackage.
Parameters
The package object to install. This parameter accepts pipeline input from
Pipeline Input: true
Parameter Set: GivenSet
Find-WinGetPackage.Aliases: InputObjectPipeline Input: true
Parameter Set: GivenSet
The package identifier to match against. Supports wildcard matching based on the MatchOption parameter.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Parameter Set: FoundSet
The package name to match against. Supports wildcard matching based on the MatchOption parameter.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Parameter Set: FoundSet
The package moniker to match against. Monikers are short, memorable names for packages.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Parameter Set: FoundSet
The name of the source to search for packages. If not specified, searches all configured sources.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Parameter Set: FoundSet
One or more strings that match against all fields of a package. Use for general search.Pipeline Input: true (by property name, remaining arguments)
Parameter Set: FoundSet
Position: 0
Parameter Set: FoundSet
Position: 0
The specific version of the package to install. If not specified, installs the latest version.Pipeline Input: true (by property name)
Controls how package fields are matched. Valid values:
Parameter Set: FoundSet
Equals- Exact match (case sensitive)EqualsCaseInsensitive- Exact match (case insensitive)StartsWithCaseInsensitive- Starts with matchContainsCaseInsensitive- Contains match
Parameter Set: FoundSet
The installation mode. Valid values:
Default- Use the package’s default install modeSilent- Silent installation with no UIInteractive- Interactive installation with UI
The installation scope. Valid values:
Any- Install to any available scopeUser- Install for current user onlyMachine- Install for all users (requires admin)
The processor architecture to install. Valid values:
Default- Use default architectureX86- 32-bit x86X64- 64-bit x64Arm- ARMArm64- ARM64
The installer type to use. Valid values include:
Default- Use package’s default installerExe- Executable installerMsi- Windows Installer packageMsix- MSIX packageInno- Inno Setup installerNullsoft- NSIS installerWix- WiX installerZip- Zip archive
Override arguments to pass to the installer, replacing default arguments.Pipeline Input: true (by property name)
Additional custom arguments to pass to the installer in addition to defaults.Pipeline Input: true (by property name)
The installation directory. Path can be relative or absolute.Pipeline Input: true (by property name)
Path to the log file. The installer’s output will be logged to this file.Pipeline Input: true (by property name)
Optional HTTP header to pass to REST-based sources.Pipeline Input: true (by property name)
Skip the installer hash validation check. Use with caution.Pipeline Input: true (by property name)
Continue installation upon non-security-related failures.Pipeline Input: true (by property name)
Skip installing package dependencies.Pipeline Input: true (by property name)
Shows what would happen if the cmdlet runs without actually executing it.
Prompts for confirmation before executing the installation.
Outputs
The result of the installation operation.
Examples
Example 1: Install by ID
Example 2: Install Specific Version
Example 3: Install from Pipeline
Example 4: Install with Custom Arguments
Example 5: Install to Specific Location
Example 6: Install with Logging
Example 7: Install for Current User
Example 8: Interactive Installation
Example 9: Install Specific Architecture
Example 10: Test Installation with WhatIf
Notes
- Alias:
iswgp - Supports
-WhatIfand-Confirmparameters - Accepts pipeline input from
Find-WinGetPackage - Default
MatchOptionisEqualsCaseInsensitivefor single package operations - Use
-Forceto continue on non-critical errors - Use
-SkipDependenciesto skip dependency installation