Skip to content

PowerShell upgrades from 7.4.5.0 MSI to 7.4.6.0 does not work #4918

Open

Description

Brief description of your issue

winget upgrade Microsoft.PowerShell
winget upgrade --exact Microsoft.PowerShell
winget upgrade --exact --id Microsoft.PowerShell
winget upgrade --id Microsoft.PowerShell

will unexpectedly result into "No installed package found matching input criteria."

Steps to reproduce

Use Windows Server vNext b26308 (might also affect other OS)
Install PowerShell 7.4.5 via MSI (winget or directly)

winget upgrade --all

Image

or

winget upgrade Microsoft.PowerShell

Image

or

winget upgrade --exact Microsoft.PowerShell

Image

or

winget upgrade --id Microsoft.PowerShell

Image

or

winget upgrade --exact --id Microsoft.PowerShell

Image

Logs

WinGet-2024-10-28-22-20-41.233.zip

Expected behavior

as winget upgrade would indicate there's a package 7.4.6, I expect it should upgrade to this version.

Actual behavior

Error

No installed package found matching input criteria.

Possible workaround:
winget install microsoft.powershell
does fetch the package correctly.

--exact or --id does not need to be specified
Image

Environment

Windows: Windows.Server v10.0.26304.5000
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.2411.0
v1.9.2411-preview

any other software: nothing special, very clean Windows Server Insider OS for testing purposes.
running winget from Microsoft Terminal in PShell 7.4.5 session

Existing PowerShell IS MSI package
Image

Activity

  1. added
    Issue-Bug
    Command-Upgrade
    and removed
    Needs-Triage
    on Oct 28, 2024
  2. Karl-WE commented on Oct 28, 2024

    @Karl-WE
    ContributorAuthor

    eventually remote related to #4908 (as per discussion with Demitrius Nelon (@denelon))

  3. Karl-WE commented on Oct 29, 2024

    @Karl-WE
    ContributorAuthor

    with further testing can confirm that

    winget install Microsoft.PowerShell

    would result into the same error as mentioned in 4908 linked above
    Image

    Noteably and irritating though output from Settings > Installed Apps

    Image

  4. Karl-WE commented on Oct 29, 2024

    @Karl-WE
    ContributorAuthor

    When I uninstalled both, each were MSI files. No idea how this happened that they "appear" installed side-by-side.

    Theory: The PS7 package got upgraded through Windows Update (MSInstaller icon) while native MSI has the nice PS7 shell icon?

    Ideas? Steve Lee (@SteveL-MSFT) Dongbo Wang (@daxian-dbw) on the side-by-side situation?
    I could bet I never installed two MSI or even a combination of EXE and MSI. This is a clean Windows Server for Hyper-V testing only.

    latest logs:

    WinGet-2024-10-29-01-50-56.154.log
    WinGet-Microsoft.PowerShell.7.4.6.0-2024-10-29-01-51-09.428.log

  5. Paciupa commented on Oct 29, 2024

    @Paciupa

    I've faced with the same bug on the desktop (Win10 10.0.19045.5011, winget 1.9.25180) and on the laptop (Win11 10.0.22631.4317, winget 1.9.25180).

    winget list --upgrade-available --include-unknown or winget list --name PowerShell show:
    PowerShell 7.4.5.0-x64 Microsoft.PowerShell 7.4.5.0 7.4.6.0 winget.

    But
    winget upgrade PowerShell or
    winget upgrade --name PowerShell
    return Доступные обновления не найдены. Более новые версии пакетов недоступны в настроенных источниках.

    And
    winget upgrade PowerShell --source winget or
    winget upgrade --name PowerShell --source winget or
    winget list --id Microsoft.PowerShell or
    winget list Microsoft.PowerShell
    return Не найдены установленные пакеты, соответствующие введенным условиям..

    winget source reset --force and winget source update didn't help.

    As I understood from logs winget tries to use Microsoft.PowerShell.Preview from winget source or 9MZ1SNWT0N5D from msstore source, but not Microsoft.PowerShell from winget source.

    Logs from desktop (Win10):
    WinGet-2024-10-29-16-05-29.211.log
    WinGet-2024-10-29-16-05-19.828.log
    WinGet-2024-10-29-16-04-58.773.log
    WinGet-2024-10-29-16-04-07.869.log
    WinGet-2024-10-29-16-03-57.113.log
    WinGet-2024-10-29-15-47-49.441.log
    WinGet-2024-10-29-15-46-56.721.log
    WinGet-2024-10-29-15-46-44.103.log

    Logs from laptop (Win11):
    WinGet-2024-10-29-18-13-35.996.log
    WinGet-2024-10-29-18-13-24.945.log

  6. Karl-WE commented on Oct 29, 2024

    @Karl-WE
    ContributorAuthor

    Thank you for joining and repro on your end.

  7. Karl-WE commented on Oct 30, 2024

    @Karl-WE
    ContributorAuthor

    Potentially related #3989

  8. suprunchuk commented on Dec 3, 2024

    @suprunchuk

    I've faced with the same bug on the desktop Win11 pro 26100.2454, winget 1.9.25200.

  9. Karl-WE commented on Dec 3, 2024

    @Karl-WE
    ContributorAuthor

    For me it manifested that we have a packaging conflict.

    When I deploy PowerShell 7 via winget (MSI) and this one is upgraded via Windows Update it might cause a new installer instance in registry.
    They have different PowerShell Icons in WINDOWS + X > Apps and Features.

    Can you confirm you are seeing two PowerShell 7 entries?
    Pasha Suprunchuk (@suprunchuk)

  10. suprunchuk commented on Dec 4, 2024

    @suprunchuk

    hi. I see one application installed. it seems that the problem was solved by reinstalling. thanks for the reply.

    Image

  11. Karl-WE commented on Dec 4, 2024

    @Karl-WE
    ContributorAuthor

    Looks good. Thanks!
    Reinstall manually, msi repair or via winget. From the app icon it appears to be the installer Information from Windows Update. As winget and PS Release would show a PS7 Logo.

  12. MemQu commented on Mar 27, 2025

    @MemQu

    I had the same problem with 7.4.6 to 7.5.0, win 10, winget 1.10.3401

  13. fowl2 commented on Mar 23, 2026

    @fowl2

    probably the same as #2858

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

    Command-UpgradeIssue-Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions