Currently working with WinGet to improve application deployment lifecycle within Intune. I am looking at deploying a detection script that checks for the installed version daily, then triggers the remediation if there is an available update.
Doing something as simple as:
winget list --name 7-Zip
will return as follows:
Name Id Version Available Source
----------------------------------------------------
7-Zip 19.00 (x64) 7zip.7zip 19.00 22.01 winget
Within Powershell, is there a way we can check and compare the Available "column" to the Version "column", and return an exit 0 or exit 1?
Thanks in advance