microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.53k stars 1.39k forks source link

The `Get-WinGetPackage` and `Get-WinGetPackageUpdate` cmdlets do not report anymore the package name #4488

Closed marticliment closed 1 month ago

marticliment commented 1 month ago

Brief description of your issue

The Get-WinGetPackage and Get-WinGetPackageUpdate cmdlets do not report anymore the package name. Therefore, it is not possible to obtain the package name for certain entries where the IDs are not representative of the package.

The PSObject representing packages do not appear to have anymore the $Name attributes.

Get-WinGetPackageUpdate: image

Get-WinGetPackage: image

Steps to reproduce

Update the PowerShell module and WinGet to the latest stable version

Expected behavior

Have the $Name attribute exposed as before

Actual behavior

The $Name attribute is not available

Environment

[winget --info]
Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22635.3570
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

[Get-WinGetVersion]
v1.7.11261

[Get-InstalledModule]

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
1.7.11132            Microsoft.WinGet.Client             PSGallery            PowerShell Module for the Windows Package Manager Client. Due to https://github.com/PowerShell/PSResourceGet/issues/85 this mod...
denelon commented 1 month ago

Does the same thing happen with the 1.8.1133 version of the module?

image

I don't know where the Get-WinGetPackageUpdate cmdlet is coming from.

I'm getting the Name column:

image

marticliment commented 1 month ago

Yes, v1.8.1133 also seems to be affected.

Uh, in theory Microsoft.WinGet.Client is the only PS package I have installed, but I will try to reset my whole powershell environment and try again.

marticliment commented 1 month ago

My excuses, I somehow had Cobalt (an alternative WinGet pwsh interface) installed on my machine.