I don't know if it's a PS5 issue or not, but "Get-IntuneWin32App -DisplayName $Appname" return empty, if there is only 1 Win32App in Intune or 1 App with the name. I fugured out that it can't count the apps, if there is only one App, maybe its because its an Object and not an array
($null -ne $Win32MobileApps -and $Win32MobileApps.Count -gt 0)
My workaround ist to change it to
($null -ne $Win32MobileApps -and @($Win32MobileApps).Count -gt 0)
and now it works fine. Like I said I don't know if it's only my System or no one had it testet with only 1 App in Intune or 1 App in the filter :D
I don't know if it's a PS5 issue or not, but "Get-IntuneWin32App -DisplayName $Appname" return empty, if there is only 1 Win32App in Intune or 1 App with the name. I fugured out that it can't count the apps, if there is only one App, maybe its because its an Object and not an array
($null -ne $Win32MobileApps -and $Win32MobileApps.Count -gt 0)
My workaround ist to change it to
($null -ne $Win32MobileApps -and @($Win32MobileApps).Count -gt 0)
and now it works fine. Like I said I don't know if it's only my System or no one had it testet with only 1 App in Intune or 1 App in the filter :D