winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

Get-WinGetPackage.md (5425B)


      1 ---
      2 external help file: Microsoft.WinGet.Client.Cmdlets.dll-Help.xml
      3 Module Name: Microsoft.WinGet.Client
      4 ms.date: 08/01/2024
      5 online version:
      6 schema: 2.0.0
      7 title: Get-WinGetPackage
      8 ---
      9 
     10 # Get-WinGetPackage
     11 
     12 ## SYNOPSIS
     13 Lists installed packages.
     14 
     15 ## SYNTAX
     16 
     17 ```
     18 Get-WinGetPackage [-Tag <String>] [-Command <String>] [-Count <UInt32>] [-Id <String>] [-Name <String>]
     19  [-Moniker <String>] [-Source <String>] [[-Query] <String[]>] [-MatchOption <PSPackageFieldMatchOption>]
     20  [<CommonParameters>]
     21 ```
     22 
     23 ## DESCRIPTION
     24 
     25 This command lists all of the packages installed on your system. The output includes packages
     26 installed from WinGet sources and packages installed by other methods. Packages that have package
     27 identifiers starting with `MSIX` or `ARP` could not be correlated to a WinGet source.
     28 
     29 ## EXAMPLES
     30 
     31 ### Example 1: Default example
     32 
     33 ```powershell
     34 Get-WinGetPackage
     35 ```
     36 
     37 This example shows how to list all packages installed on your system.
     38 
     39 ### Example 2: Get package by Id
     40 
     41 ```powershell
     42 Get-WinGetPackage -Id "Microsoft.PowerShell"
     43 ```
     44 
     45 This example shows how to get an installed package by its package identifier.
     46 
     47 ### Example 3: Get package(s) by name
     48 
     49 ```powershell
     50 Get-WinGetPackage -Name "PowerShell"
     51 ```
     52 
     53 This example shows how to get installed packages that match a name value. The command does a substring comparison of the provided name with
     54 installed package names.
     55 
     56 ### Example 4: List all packages with an available update
     57 
     58 ```powershell
     59 Get-WinGetPackage | Where-Object IsUpdateAvailable
     60 ```
     61 
     62 This example shows how to list all packages that have an available upgrade from one of the configured sources.
     63 
     64 ## PARAMETERS
     65 
     66 ### -Command
     67 
     68 Specify the name of the command defined in the package manifest.
     69 
     70 ```yaml
     71 Type: System.String
     72 Parameter Sets: (All)
     73 Aliases:
     74 
     75 Required: False
     76 Position: Named
     77 Default value: None
     78 Accept pipeline input: True (ByPropertyName)
     79 Accept wildcard characters: False
     80 ```
     81 
     82 ### -Count
     83 
     84 Limits the number of items returned by the command.
     85 
     86 ```yaml
     87 Type: System.UInt32
     88 Parameter Sets: (All)
     89 Aliases:
     90 
     91 Required: False
     92 Position: Named
     93 Default value: None
     94 Accept pipeline input: True (ByPropertyName)
     95 Accept wildcard characters: False
     96 ```
     97 
     98 ### -Id
     99 
    100 Specify the package identifier for the package you want to list. By default, the command does a
    101 case-insensitive substring comparison on the package identifier.
    102 
    103 ```yaml
    104 Type: System.String
    105 Parameter Sets: (All)
    106 Aliases:
    107 
    108 Required: False
    109 Position: Named
    110 Default value: None
    111 Accept pipeline input: True (ByPropertyName)
    112 Accept wildcard characters: False
    113 ```
    114 
    115 ### -MatchOption
    116 
    117 Specify matching logic used for search. The parameter accepts the following values:
    118 
    119 - `Equals`
    120 - `EqualsCaseInsensitive`
    121 - `StartsWithCaseInsensitive`
    122 - `ContainsCaseInsensitive`
    123 
    124 ```yaml
    125 Type: Microsoft.WinGet.Client.PSObjects.PSPackageFieldMatchOption
    126 Parameter Sets: (All)
    127 Aliases:
    128 Accepted values: Equals, EqualsCaseInsensitive, StartsWithCaseInsensitive, ContainsCaseInsensitive
    129 
    130 Required: False
    131 Position: Named
    132 Default value: None
    133 Accept pipeline input: True (ByPropertyName)
    134 Accept wildcard characters: False
    135 ```
    136 
    137 ### -Moniker
    138 
    139 Specify the moniker of the package you want to list.
    140 
    141 ```yaml
    142 Type: System.String
    143 Parameter Sets: (All)
    144 Aliases:
    145 
    146 Required: False
    147 Position: Named
    148 Default value: None
    149 Accept pipeline input: True (ByPropertyName)
    150 Accept wildcard characters: False
    151 ```
    152 
    153 ### -Name
    154 
    155 Specify the name of the package to list. By default, the command does a case-insensitive comparison
    156 of the package name.
    157 
    158 ```yaml
    159 Type: System.String
    160 Parameter Sets: (All)
    161 Aliases:
    162 
    163 Required: False
    164 Position: Named
    165 Default value: None
    166 Accept pipeline input: True (ByPropertyName)
    167 Accept wildcard characters: False
    168 ```
    169 
    170 ### -Query
    171 
    172 Specify one or more strings to search for. By default, the command searches all configured sources.
    173 The command compares the value provided to the following package manifest properties:
    174 
    175 - `PackageIdentifier`
    176 - `PackageName`
    177 - `Moniker`
    178 - `Tags`
    179 
    180 The command does a case-insensitive substring comparison of these properties.
    181 
    182 ```yaml
    183 Type: System.String[]
    184 Parameter Sets: (All)
    185 Aliases:
    186 
    187 Required: False
    188 Position: 0
    189 Default value: None
    190 Accept pipeline input: True (ByPropertyName)
    191 Accept wildcard characters: False
    192 ```
    193 
    194 ### -Source
    195 
    196 Specify the name of the WinGet source of the package.
    197 
    198 ```yaml
    199 Type: System.String
    200 Parameter Sets: (All)
    201 Aliases:
    202 
    203 Required: False
    204 Position: Named
    205 Default value: None
    206 Accept pipeline input: True (ByPropertyName)
    207 Accept wildcard characters: False
    208 ```
    209 
    210 ### -Tag
    211 
    212 Specify a package tag to search for.
    213 
    214 ```yaml
    215 Type: System.String
    216 Parameter Sets: (All)
    217 Aliases:
    218 
    219 Required: False
    220 Position: Named
    221 Default value: None
    222 Accept pipeline input: True (ByPropertyName)
    223 Accept wildcard characters: False
    224 ```
    225 
    226 ### CommonParameters
    227 
    228 This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
    229 -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable,
    230 -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
    231 [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
    232 
    233 ## INPUTS
    234 
    235 ### System.String
    236 
    237 ### System.UInt32
    238 
    239 ### System.String[]
    240 
    241 ### Microsoft.WinGet.Client.PSObjects.PSPackageFieldMatchOption
    242 
    243 ## OUTPUTS
    244 
    245 ### Microsoft.WinGet.Client.Engine.PSObjects.PSInstalledCatalogPackage
    246 
    247 ## NOTES
    248 
    249 ## RELATED LINKS
    250 
    251 [Uninstall-WinGetPackage](Uninstall-WinGetPackage.md)
    252 
    253 [Update-WinGetPackage](Update-WinGetPackage.md)