Update all but exclude teams and office #124620
Unanswered
drummbelbummel
asked this question in
Ideas
Replies: 1 comment 2 replies
-
Have you tried using the WinGet powershell module? https://www.powershellgallery.com/packages/Microsoft.WinGet.Client/ There isn't an option in the PowerShell module yet to exclude a package from update (what the Get-WinGetPackage | Where-Object {($_.IsUpdateAvailable -eq $true) -and ($_.Id -ne 'Microsoft.Teams') -and ($_.Id -ne 'Microsoft.Office')} | ForEach-Object { Update-WinGetPackage -Id $_.ID } This will get all the packages available for update, filter out Microsoft.Teams and Microsoft.Office, and then pipe that to Update-WinGetPackage to upgrade all other packages |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I really love winget as it is making it very easy to keep non microsoft apps "up to date".
But every time i am struggling with teams and office.
It looks like winget is not able to update these applications in an environment with intune mdm.
So i wanted to use a script to exclude those two - just exporting "winget list --upgrade-available" and than looping through the result and skipping the id's
But - the comments in the output are not helpfull for what i want to do.
Could there be a parameter like "display only" with the option to get only the id or name of the package?
So i could loop through each app and decide what i want to happen.
Beta Was this translation helpful? Give feedback.
All reactions