Skip to main content
Searches configured sources for packages matching the specified criteria.

Syntax

Find-WinGetPackage
    [-Id <string>]
    [-Name <string>]
    [-Moniker <string>]
    [-Source <string>]
    [-Query <string[]>]
    [-Tag <string>]
    [-Command <string>]
    [-Count <uint>]
    [-MatchOption <PSPackageFieldMatchOption>]
    [<CommonParameters>]

Description

The Find-WinGetPackage cmdlet searches configured sources for packages. You can filter packages by ID, name, moniker, tags, commands, or perform a general search across all fields using the Query parameter. Results can be piped to Install-WinGetPackage for installation.

Parameters

Id
string
The package identifier to match against. Supports wildcard matching based on the MatchOption parameter.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Name
string
The package name to match against. Supports wildcard matching based on the MatchOption parameter.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Moniker
string
The package moniker to match against. Monikers are short, memorable names for packages.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Source
string
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
Query
string[]
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
Tag
string
Filter packages by tag. Matches against the tags defined in the package manifest.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Command
string
Filter packages by command. Matches against commands provided by the package.Pipeline Input: true (by property name)
Parameter Set: FoundSet
Count
uint
default:"unlimited"
The maximum number of results to return. Valid range: 1-1000.Pipeline Input: true (by property name)
Parameter Set: FoundSet
MatchOption
PSPackageFieldMatchOption
default:"ContainsCaseInsensitive"
Controls how package fields are matched. Valid values:
  • Equals - Exact match (case sensitive)
  • EqualsCaseInsensitive - Exact match (case insensitive)
  • StartsWithCaseInsensitive - Starts with match
  • ContainsCaseInsensitive - Contains match
Pipeline Input: true (by property name)
Parameter Set: FoundSet

Outputs

PSFoundCatalogPackage
object
A package found in configured sources.

Examples

Example 1: Search by Name

Find-WinGetPackage -Name "Visual Studio Code"
Finds packages with names containing “Visual Studio Code”.

Example 2: Search by ID

Find-WinGetPackage -Id Microsoft.PowerToys
Finds the PowerToys package using its exact ID.
Find-WinGetPackage -Query "python"
Searches for “python” across all package fields.

Example 4: Search in Specific Source

Find-WinGetPackage -Name "PowerToys" -Source winget
Searches for PowerToys only in the winget source.

Example 5: Search by Tag

Find-WinGetPackage -Tag "utilities"
Finds packages tagged with “utilities”.

Example 6: Search by Command

Find-WinGetPackage -Command "code"
Finds packages that provide the “code” command.

Example 7: Limit Results

Find-WinGetPackage -Query "browser" -Count 5
Returns the first 5 packages matching “browser”.

Example 8: Exact Match

Find-WinGetPackage -Name "Git" -MatchOption EqualsCaseInsensitive
Finds packages with the exact name “Git” (case insensitive).

Example 9: Starts With Match

Find-WinGetPackage -Name "Micro" -MatchOption StartsWithCaseInsensitive
Finds packages whose name starts with “Micro”.

Example 10: Search and Install

Find-WinGetPackage -Id Microsoft.PowerToys | Install-WinGetPackage
Finds PowerToys and pipes it to Install-WinGetPackage for installation.

Example 11: Search and Select

Find-WinGetPackage -Query "editor" | Select-Object Name, Id, Version, Source
Searches for editors and displays selected properties.

Example 12: Search Multiple Terms

Find-WinGetPackage -Query "text", "editor"
Searches for packages matching both “text” and “editor”.

Notes

  • Alias: fdwgp
  • Default MatchOption is ContainsCaseInsensitive for search operations
  • Results are limited to 1000 packages maximum
  • Use -Count to limit the number of results
  • Packages can be piped to Install-WinGetPackage for installation
  • Search occurs across all configured sources unless -Source is specified

Build docs developers (and LLMs) love