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.5k stars 1.39k forks source link

WinGet fails in Windows PowerShell but runs via PowerShell in Windows Terminal #4519

Open denelon opened 3 weeks ago

denelon commented 3 weeks ago

As can be seen here.

https://github.com/microsoft/winget-cli/assets/9511158/6bb893f2-1fc0-4dc6-a896-2755fb5f3a9b

Originally posted by @Battler624 in https://github.com/microsoft/winget-cli/discussions/4427

Battler624 commented 3 weeks ago

Winget-info does not work on either powershell or powershell via terminal

winget-info : The term 'winget-info' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ winget-info
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (winget-info:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
denelon commented 3 weeks ago

Can you install the Microsoft.WinGet.Client PowerShell module and try running Repair-WinGetPackageManager -Latest -Force and let me know if that resolves the issue?

Battler624 commented 3 weeks ago

Can you install the Microsoft.WinGet.Client PowerShell module and try running Repair-WinGetPackageManager -Latest -Force and let me know if that resolves the issue?

Winget now works in both, winget-info still doesn't work.

Edit: Winget --info works tho.

https://i.imgur.com/7CvbJ5x.png