In the ninth and last video about WinGet, we will do a real-life scenario where we use WinGet List/Upgrade in Microsoft Intune Remediation Scripts to automatically update software that needs an update. Extremely powerful and valuable. The scripts will be in PowerShell, and we will go through them line by line to understand them, which, together with all the previous WinGet videos, is going to make you more powerful at work! Master WinGet Playlist: ####Detection Script ### Runs as Dection script if Zoom is installed and needs an update ### Author: John Bryntze ### Date: 7th February 2025 ## set variables $JBNWingetAppID = " " $JBNWingetAppFriendlyName = "Zoom" ## Help SYSTEM find folder Set-Location -Path ("$env:ProgramW6432\WindowsApps\ *_x64__8wekyb3d8bbwe") ## Check if there is an upgrade $LocalInstall = .\ list -e --id $JBNWingetAppID --accept-source-agreements --upgrade-available #Write-Output $LocalInstall[-1] if ($LocalInstall[-1].Trim() -eq "1 upgrades available.") { write-Output "There is an upgrade needed for $JBNWingetAppFriendlyName, lets Exit 1 and run remediation script to upgrade!" exit 1 #This makes the Remediation script to run } else { write-Output "Either $JBNWingetAppFriendlyName is not installed or already on the latest, either way we are good" exit 0 #Well if there is no upgrade needed or software not installed, we are good and can exit, no more actions needed. } ####Remediation Script ### Update to the latest Zoom ### Author: John Bryntze ### Date: 7th February 2025 ## set variables $JBNWingetAppID = " " ## Help SYSTEM find folder Set-Location -Path ("$env:ProgramW6432\WindowsApps\ *_x64__8wekyb3d8bbwe") ## Update software with .\ upgrade -e --id $JBNWingetAppID --silent --accept-package-agreements --accept-source-agreements Timeline 00:00 Intro 01:00 Overview of workflow 05:24 Review Detection Script 23:43 Review Remediation Script 28:58 Create Remediation Script in Intune 32:23 Testing the workflow 34:06 Summary and Outro











