PowerShell - Make `Update-WinGetPackage` work just like `winget upgrade` (with no arguments)
Description of the new feature / enhancement
winget upgrade shows a list of installed programs with a newer version available, if any. It also has --include-pinned and --include-unknown.
I find no similar functionality in Microsoft.WinGet.Client. I'd expect Update-WinGetPackage to work the same, so I add this as a feature request.
- Or add a parameter (switch)
-ListAvailableUpdates?
Proposed technical implementation details
Make Update-WinGetPackage act like winget upgrade.
I find no similar functionality in Microsoft.WinGet.Client
Have you tried using Get-WinGetPackage | Where-Object {$_.IsUpdateAvailable}? This command will include packages with installed versions as "Unknown" by default giving you the --include-unknown functionality. If you want to exclude those, you can do it with a check as: Get-WinGetPackage | Where-Object {$_.IsUpdateAvailable -and $_.InstalledVersion -ne "Unknown"}
As for --include-pinned, I believe that functionality will be added when support for pinning is added to PowerShell module. See https://github.com/microsoft/winget-cli/issues/3234.
Note: Get-WinGetPackage is equivalent to the winget list command. You can think of the above command as an equivalent to winget list --upgrade-available (which itself is equivalent to winget upgrade)
@mdanish-kh
Yes, I've found the winget list equivalent cmdlet, but I don't view it as equivalent to winget upgrade as it returns all installed packages. Yes you can filter with PowerShell, but still.
If Get-WinGetPackage gets support to view updates for pinned packages too I guess we have the barebone functionality in place. But I'd still want a winget upgrade equivalent cmdlet.