Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell - Make Update-WinGetPackage work just like winget upgrade (with no arguments) #4375

Open
o-l-a-v opened this issue Apr 13, 2024 · 2 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. PowerShell Issue related to WinGet PowerShell Module or cmdlet

Comments

@o-l-a-v
Copy link

o-l-a-v commented Apr 13, 2024

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.

@o-l-a-v o-l-a-v added the Issue-Feature This is a feature request for the Windows Package Manager client. label Apr 13, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Apr 13, 2024
@mdanish-kh
Copy link
Contributor

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 #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)

@microsoft-github-policy-service microsoft-github-policy-service bot added PowerShell Issue related to WinGet PowerShell Module or cmdlet and removed Needs-Triage Issue need to be triaged labels Apr 13, 2024
@o-l-a-v
Copy link
Author

o-l-a-v commented Apr 13, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. PowerShell Issue related to WinGet PowerShell Module or cmdlet
Projects
None yet
Development

No branches or pull requests

2 participants