Relevant area(s)
WinGet CLI
Relevant command(s)
winget search
Brief description of your issue
Sporadically, but certainly more often than never, I've found myself in situations where I've wanted to search through Winget packages with search terms that start with a dash (-).
However, Winget always treat that as if it was a parameter, making it either impossible or unintuitive to search with search terms that start with dashes.
Screenshot:
Steps to reproduce
- Open PowerShell 7.6.2 in Windows Terminal.
- Run
winget search "-a"
- Receive the error "Argument alias was not recognized for the current command: '-a'"
- Just to be truly sure there are no obvious solutions to it, run
winget search \-a with a backslash.
- See that it finds no results.
Expected behavior
That it is possible to use winget search with search terms that start with a dash, so that e.g. running winget search "-l" would have found D-Link packages.
Actual behavior
That all search terms that start with dashes are instead interpreted as if they were parameters.
Environment
Windows Package Manager (Preview) v1.29.170-preview
© 2026 Microsoft. All rights reserved.
Windows: Windows.Desktop v10.0.26200.8246
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.29.170.0
WinGet Directories
-------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOu…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settin…
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
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules
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
Group Policy State
--------------------------------------------------
Enable Windows App Installer Hash Override Enabled
Admin Setting State
--------------------------------------------------
LocalManifestFiles Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Enabled
LocalArchiveMalwareScanOverride Enabled
ProxyCommandLineOptions Disabled
ConfigurationProcessorPath Disabled
DefaultProxy Disabled
Relevant area(s)
WinGet CLI
Relevant command(s)
winget search
Brief description of your issue
Sporadically, but certainly more often than never, I've found myself in situations where I've wanted to search through Winget packages with search terms that start with a dash (
-).However, Winget always treat that as if it was a parameter, making it either impossible or unintuitive to search with search terms that start with dashes.
Screenshot:
Steps to reproduce
winget search "-a"winget search \-awith a backslash.Expected behavior
That it is possible to use
winget searchwith search terms that start with a dash, so that e.g. runningwinget search "-l"would have found D-Link packages.Actual behavior
That all search terms that start with dashes are instead interpreted as if they were parameters.
Environment