none
Get-CMUserDeviceAffinity Types and Sources RRS feed

  • Question

  • Hello,

    The SCCM (Current Branch) Powershell command "Get-CMUserDeviceAffinity" returns numbers in braces "{}" for the Sources and Types properties. 

    Example:

    Sources : {2, 6}
    Types : {1}

    Numbers in this format don't seem to be usable for filtering such as Where-Object Types -eq 1 or exporting to CSV (values show as System.UInt32[]).

    Can someone please advise how to convert these property values into something usable.

    Thank you


    MrGoodBytes


    • Edited by MrGoodBytes Thursday, February 23, 2017 1:25 AM
    Thursday, February 23, 2017 1:22 AM

Answers

  • You have to use Where-Object{$_.Sources -contains 3}

    "-contains" and "-in" insect a collection's (denoted by {}) members.


    \_(ツ)_/

    • Marked as answer by MrGoodBytes Thursday, February 23, 2017 5:33 AM
    Thursday, February 23, 2017 1:59 AM