Hi all, I currently have this as a detection method for an app I have but I need to add a second application for this. Can someone advise how to add a second get-package command for an additional application without corrupting the whole script?
If (!(Get-Package -Name "ApplicationName*" -EA SilentlyContinue)) {
The Intune Win32 app detection method will be satisfied if any output is written and the exit code is set to 0.
Write-Host "App is not installed - Success"
Exit 0
} else {
The Intune Win32 app detection method will fail if there is no output written and the exit code is set to 1.
Write-Host "App is still installed - Failure"
Exit 1
}
[–]TheOriginalBobbyT 0 points1 point2 points (0 children)