When I try to install PowerShell 7.0.1, winget cannot seem to locate the correct one
None of these work
winget install PowerShell
winget install Powershell
winget install Microsoft.Powershell
winget install --id Microsoft.Powershell --version 7.0.1
It should pick up Powershell 7.0.1 (btw, that should have been named PowerShell not Powershell)
I get the following:
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
---------------------------------------------------------------
Powershell Microsoft.Powershell 7.0.1
PowerShell-Preview Microsoft.PowerShell-Preview 7.1.0-preview.3
PS C:\Users\adil> winget --info
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.18363.836
Package: Microsoft.DesktopAppInstaller v1.0.41331.0
Links:
Privacy Statement: https://aka.ms/winget-privacy
License agreement: https://aka.ms/winget-license
3rd Party Notices: https://aka.ms/winget-3rdPartyNotice
Homepage: https://aka.ms/winget
I have the same issue trying to Install FireFox.
It seems that if there is an exact match, then that should be installed.
I was able to install or upgrade PowerShell using the exact match parameter
winget install -e Microsoft.Powershell
A better solution to installing PowerShell7 is to use the install-powershell command in power shell's github repo. It gives you much more flexibility. It can also be remoted over PS Remoting, which winget appears to not handle.
A better solution to installing PowerShell7 is to use the install-powershell command in power shell's github repo. It gives you much more flexibility. It can also be remoted over PS Remoting, which winget appears to not handle.
Good point but I believed winget was designed in similar functionality to apt utility, meaning you have to be on the server/machine in some form to use it. I guess you can use PS and winget together to extend that functionality...my 2c
I ran into the same problem today. I would expect it to be interactive like:
"Multiple packages matched your query. Please select one of the following:
[1] Microsoft.Powershell
[2] Microsoft.PowerShell-Preview"
Anyway thanks for the awesome work 馃挭
This worked fine about 2 days ago, but the 7.1.0 preview version was not available at that time. Unfortunately, I am not having any success using the '-e' switch either. :(
Ran into this same issue as well.
winget install -e Microsoft.Powershell did work for me but these circumstances should probably be handled a bit cleaner with perhaps a selection list or some other method.
Thanks for the great work on this!
I ran into the same problem today. I would expect it to be interactive like:
"Multiple packages matched your query. Please select one of the following:
[1] Microsoft.Powershell
[2] Microsoft.PowerShell-Preview"Anyway thanks for the awesome work
The problem is, preview version should not even come up when the version is specified. Names are similar but versions are different. It's as if version is totally ignored.
winget install -e Microsoft.PowerShell doesn't work.
winget install -e Microsoft.Powershell does work.
The search is case sensitive! (https://github.com/microsoft/winget-pkgs/pull/884)
How would I discover -e. And what does '-e' mean?
A bad UI.
@doctordns winget install --info
--info doesn't exist on install but it will return the options.
First thing i tried was winget install hoping that it would return the help of the install module.
winget team -> Loving this cli so far by the way! 馃憤
I had a similar problem trying to install Discord
PS C:\Users\orta> winget
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
WinGet command line utility enables installing applications from the command line.
usage: winget [<command>] [<options>]
The following commands are available:
install Installs the given application
show Shows info about an application
search Find and show basic info of apps
hash Helper to hash installer files
validate Validates a manifest file
For more details on a specific command, pass it the help argument. [-?]
The following options are available:
-v,--version Display the version of the tool
--info Display general info of the tool
More help can be found at: https://aka.ms/winget-command-help
PS C:\Users\orta> winget install discord
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
PS C:\Users\orta> winget install discord.discord
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
PS C:\Users\orta> winget install Discord.Discord
Multiple apps found matching input criteria. Please refine the input.
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
PS C:\Users\orta> winget install --help
Windows Package Manager v0.1.41331 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
Installs the given application
usage: winget install [[-q] <query>] [<options>]
The following arguments are available:
-q,--query The query used to search for an app
The following options are available:
-m,--manifest The path to the manifest of the application
--id Filter results by id
--name Filter results by name
--moniker Filter results by app moniker
-v,--version Use the specified version; default is the latest version
-s,--source Find app using the specified source
-e,--exact Find app using exact match
-i,--interactive Request interactive installation; user input may be needed
-h,--silent Request silent installation
-o,--log Log location (if supported)
--override Override arguments to be passed on to the installer
-l,--location Location to install to (if supported)
More help can be found at: https://aka.ms/winget-command-install
PS C:\Users\orta> winget install --id Discord.Discord
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
--------------------------------------------
Discord Discord.Discord 0.0.306
Discord Canary Discord.DiscordCanary 0.0.264
( and I kinda left it at that and installed it manually )
@orta it would probably work if you used
winget install --exact Discord.Discord or winget install -e Discord.Discord
problem is that:
1) -e option is not obvious
2) It's Case sensitive, and that's not obvious either
both of these are documentation problems. If winget team took a clue from PowerShell team and actually created a help that's useful, with examples, people could have discovered how to do these.
There are other problems though, mainly disregard for version. I cannot think of any good reason why this should not work:
winget install --id Discord.Discord --version 0.0.306
that's nuts!
My takeaway here is the semantic text being used here. Right now winget install behaves exactly like winget show at times where it can't find an exact output.
install is a command, the verb is specific in nature and implicitly suggests that it expects an exact match. The install command should fail when a exact match cannot be picked out (with appropriate messaging).
How does Winget KNOW that I do not want both versions loaded? I have two versions of Snagit, Multiple versions of.NET, etc.
And if 'install' is a verb, then 'show' should be 'get'.
From my phone so apologies for the typos.
!
BTW
winget install -e Microsoft.Powershell
will install 7.0.0
to install the latest run
winget install --id Microsoft.PowerShell -e
This worked for me, but others have reported that it didn't work (I see a PR has been made to make this work):
winget install -e Microsoft.PowerShell
This worked for me, but others have reported that it didn't work (I see a PR has been made to make this work):
winget install -e Microsoft.PowerShell
I had that issue and winget install Microsoft.PowerShell -e worked like a charm
same issue with me but installing git through winget
I ran into this issue specifically with terminal; I saw on one of the blogs about winget suggesting i could simply "winget install terminal" and I was very excited to try this 馃槄
I think one solution (to these specific packages) is to exclude preview/prerelease packages unless a flag is provided. Notify that prereleases are available if you insist, but unless a user is explicitly trying to install a prerelease, listing it in the default query may not be helpful.
Although hiding the preview is a solution for now, if someone comes along with SuperTerminal or TerminalX, users will have the exact same issue again, needing to qualify "Microsoft.WindowsTerminal" (it's a lot to type, relative to other package managers, terminal is a lot more concise and memorable!). I imagine some kind of name aliasing for packages or prompting the user to ask about a best match (unless it's run non-interactively) would be better long term solutions.
At the moment, when installing apps with multiple search results, the following nomenclature is working perfectly:
winget install --name <appName> -e
Note that the _appName_ is Case Sensitive !
@SubhamK108 Thanks for the short solution.
I was able to install or upgrade PowerShell using the exact match parameter
winget install -e Microsoft.Powershell
This also worked for me, although I did get an error with Google Chrome about the "installer hash verification failed." Everything else worked great.
I was able to install or upgrade PowerShell using the exact match parameter
winget install -e Microsoft.Powershell
The documentation/help is not clear about -e which is too bad and easy to fix
winget install -e Microsoft.PowerShelldoesn't work.
winget install -e Microsoft.Powershelldoes work.The search is case sensitive! (microsoft/winget-pkgs#884)
However, now things have changed:
winget install -e Microsoft.PowerShell does work while winget install -e Microsoft.Powershell doesn't work.
@Sciroccogti The same for me. However at the end of installation I received a message "Installation abandoned". Nevertheless the installation completed successfully.
@Sciroccogti The same for me. However at the end of installation I received a message "Installation abandoned". Nevertheless the installation completed successfully.
Oh yes I received that message as well, but I was running the powershell installation in powershell itself, so I think it's normal for it to be 'abandoned'.
Same issue trying to install Terminal as others have stated:
winget install Microsoft.WindowsTerminal
Fails with:
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
--------------------------------------------------------------------
Windows Terminal Microsoft.WindowsTerminal 1.0.1401.0
Windows Terminal Preview Microsoft.WindowsTerminalPreview 1.1.1671.0
Workaround confirmed working using the -e:
winget install -e Microsoft.WindowsTerminal
Using this as install button is broken in Microsoft Store again and re-registering app-x packages is failing this time.
winget install --id<appID> -e
Like the others, I'm having the same sort of issue
winget install Google.Chrome
outputs this
Multiple apps found matching input criteria. Please refine the input.
Name Id Version
------------------------------------------
Chrome Google.Chrome 84.0.4147.89
Chrome Beta Google.ChromeBeta 84.0.4147.38
Only was able to work with the -e flag
winget install -e Google.Chrome
If package IDs were unique, shouldn't the install command default to ID for seamless usage?
There were a few steps involved in getting a solution to this Issue. We are using some of the same codebase on the server to build the database of apps. The issue is that a substring wasn't being treated as an "exact" match for show or install. We're testing a version of the client that will hopefully provide a resolution.
Also in the screenshot above is it a bit strange that Chrome Beta is actually an older version than Chrome non-beta. Does this mean repos are not yet kept up to date?
@AdilHindistan this Issue should be resolved with the current release of the client (v0.1.42101 Preview). The matching criteria for show and install are identical and will lock on an "exact" string match. The matching criteria for search is still more broad to help locate packages with matching substrings.
Most helpful comment
I was able to install or upgrade PowerShell using the exact match parameter
winget install -e Microsoft.Powershell