Syntax
Description
TheUpdate-WinGetPackage cmdlet updates an installed package to a newer version. You can specify packages by ID, name, moniker, or by passing a package object from Get-WinGetPackage. If no version is specified, updates to the latest available version.
Parameters
The package object to update. This parameter accepts pipeline input from
Pipeline Input: true
Parameter Set: GivenSet
Get-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 package updates. 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 to update to. If not specified, updates to 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 for the update. 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 package
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)
Include packages with unknown versions in the update. By default, packages with unknown versions are skipped.Pipeline Input: true (by property name)
Shows what would happen if the cmdlet runs without actually executing it.
Prompts for confirmation before executing the update.
Outputs
The result of the update operation.
Examples
Example 1: Update by ID
Example 2: Update to Specific Version
Example 3: Update from Pipeline
Example 4: Update All Packages
Example 5: Update with Logging
Example 6: Update with Custom Arguments
Example 7: Update Including Unknown Versions
Example 8: Silent Update
Example 9: Test Update with WhatIf
Example 10: Update with Force
Notes
- Alias:
udwgp - Supports
-WhatIfand-Confirmparameters - Accepts pipeline input from
Get-WinGetPackage - Default
MatchOptionisEqualsCaseInsensitivefor single package operations - Use
-IncludeUnknownto update packages with unknown installed versions - The update process uses the same installer as the initial installation