winget list --upgrade-available cannot be sorted and PowerShell module does not support listing upgrades #4773
Labels
In-PR
Issue related to a PR
Issue-Docs
It's a documentation issue that really should be on MicrosoftDocs
PowerShell
Issue related to WinGet PowerShell Module or cmdlet
Milestone
winget list --upgrade-available
cannot be piped to sort so via a StackOverflow answer and a couple of other issues on this repo (here and here) I found myself installing the Powershell module.However, the module does not seem to have a way of listing available upgrades.
Get-WinGetPackage
has-Query
and-MatchOption
options (shown when tabbing for autocompletion) which do not seem to be in the current source code (maybe they're inherited?). However, these options seem to only match on strings.I attempted to do
Get-WinGetPackage | where { -not ([string]::IsNullOrWhitespace($_.AvailableVersions)) }
but I get 95 results (there are quite a few results where theAvailable
field is empty yet the package still makes it through the filter) whereaswinget list --upgrade-available
lists 46 upgrades.If there is another way to list available upgrades it's not obvious and should be better documented.
Environment
The text was updated successfully, but these errors were encountered: