Skip to content

[Bug] 1.5.0 "Get-IntuneWin32App -DisplayName $Appname" returns empty, counting is broken #214

@AlkHacNar

Description

@AlkHacNar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions