Skip to content

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

Open

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.

Activity

  1. added
    Issue-Bug
    Needs-Triage
    on Apr 20, 2026
  2. added
    PowerShell
    on Apr 20, 2026
  3. nogaff commented on Apr 20, 2026

    @nogaff
    Author

    Strangely, I can't reproduce this on three other machines, so I'm not sure what's going on with the first machine.

    Results also vary on the first machine, depending on the context in which the command is run.

    Running it with my local admin account gives the results in my OP (whether elevated or not), but running in the SYSTEM context only outputs the PeaZip package and not the PowerShell package. Both packages are installed machine-wide.

    I suppose it could just be something broken on that machine, or a weird edge-case, but I'm happy to investigate further if anyone has any suggestions for additional diagnostics to perform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugPowerShell

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions