WinGet.exe upgrade --all -Exclude

Vij 306 Reputation points
2023-04-07T17:32:54.1133333+00:00

How to exclude the list of apps [third-party application, MS applications, and MS KBnumbers] while running winget upgrade -all commands. Is there any parameter to exclude any application? It will be appriciated

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,538 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,517 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,029 questions
{count} votes

Accepted answer
  1. Rich Matheisen 46,636 Reputation points
    2023-04-08T19:56:56.1566667+00:00

    There is no "-Exclude" option for the current version of WinGet.

    You can place a feature request (use the "New Issue" button) here: https://github.com/microsoft/winget-cli/issues. You'll have to create a GitHub account in order to do so.

    You can also create you own JSON file containing only the package Id's you want to update. https://video2.skills-academy.com/en-us/windows/package-manager/


2 additional answers

Sort by: Most helpful
  1. Amal Chandrappan 0 Reputation points
    2024-05-26T00:44:10.2333333+00:00

    You can do this: winget upgrade app1.id, app2.id, app3.id

    You will get the app id from the available updates list after running winget upgrade

    0 comments No comments

  2. Vij 306 Reputation points
    2024-09-18T05:45:56.2033333+00:00

    https://github.com/microsoft/winget-pkgs/discussions/124620

    Get-WinGetPackage | Where-Object {($.IsUpdateAvailable -eq $true) -and ($.Id -ne 'Microsoft.Teams') -and ($.Id -ne 'Microsoft.Office')} | ForEach-Object { Update-WinGetPackage -Id $.ID }

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.