winget-cli
winget-cli copied to clipboard
WinGet fails in Windows PowerShell but runs via PowerShell in Windows Terminal
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
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
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?
Can you install the Microsoft.WinGet.Client PowerShell module and try running
Repair-WinGetPackageManager -Latest -Forceand 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
Can you install the Microsoft.WinGet.Client PowerShell module and try running
Repair-WinGetPackageManager -Latest -Forceand let me know if that resolves the issue?
Thanks this worked for me! Difference was that winget itself was not working in any terminal window, but now it is again, thank you
I'm no longer able to reproduce this error.