Skip to content

Certain winget packages that are found by Get-WinGetPackage are not returned by Get-WinGetPackage -Id #6161

@nogaff

Description

@nogaff

Relevant area(s)

PowerShell Module

Relevant command(s)

No response

Brief description of your issue

There seem to be certain installed winget packages that are correctly listed in the output of a simple Get-WinGetPackage command, but if I check for those same packages with a specifically targeted Get-WinGetPackage -Id 'The.Package.Id' command, it returns nothing.

Steps to reproduce

Run this one-liner in PowerShell 7:

Get-WinGetPackage |? Source -EQ 'winget' |% { (Get-WinGetPackage -Id $_.Id -MatchOption Equals) ? $null : $_ }

Expected behavior

No output, ever.

First this gets all installed winget packages, then it tries to get each discovered package again by its exact ID, and outputs any packages that were found the first time but not the second. This should not be possible, so there should never be any output.

Actual behavior

Output on my machine:

Name       Id                   Version Available Source
----       --                   ------- --------- ------
PeaZip     Giorgiotani.Peazip   10.5.0  11.0.0    winget
PowerShell Microsoft.PowerShell 7.5.5.0           winget

Environment

Windows Package Manager v1.28.220
Windows: Windows.Desktop v10.0.26200.8246
Package: Microsoft.DesktopAppInstaller v1.28.220.0

All testing carried out in PowerShell 7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.PowerShellIssue related to WinGet PowerShell Module or cmdlet

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions