AD Custom Attributes format issue in PS

This topic contains 2 replies, has 2 voices, and was last updated by  Eddie Cooper 2 months ago.

  • Author
  • #95529

    Eddie Cooper

    I have had to create some custom AD attributes, created manually in Schema Admin snap-in, & configured as single value.

    I have populated the attributes as I need using PS; when I pull the values out in PS5 they appear to be in a multi value format in {}, but when I pull the values using PS3 they come out correctly as just the text data.

    When I export the attributes to CSV, they come out as ADPropertyValueCollection rather than the value.

    In contrast, data pulled from extensionAttributes comes out correctly as just the data, regardless which version of PS I use.

    I know I can handle the difference in PS5, but this will be used in SCCM which doesn't offer data manipulation as it discovered the attribute values.

    Any thoughts on why PS5 is mangling the data?

    Get-ADComputer | Set-ADComputer -Clear CmClusterInfo
    Get-ADComputer | Set-ADComputer -Clear CmBusinessOwner
    Get-ADComputer | Set-ADComputer -Clear extensionAttribute7
    Get-ADComputer | Set-ADComputer -Add @{CmClusterInfo = "CNO" }
    Get-ADComputer | Set-ADComputer -Add @{CmBusinessOwner = "Test"}
    Get-ADComputer | Set-ADComputer -Add @{extensionAttribute7 = "CNO" }
    Get-ADComputer -Properties CmClusterInfo,CmBusinessOwner,extensionAttribute7 | select CmClusterInfo,CmBusinessOwner,extensionAttribute7

    PS3 gives:
    CmClusterInfo CmBusinessOwner extensionAttribute7
    CNO Test CNO

    PS5 gives:
    CmClusterInfo CmBusinessOwner extensionAttribute7
    {CNO} {Test} CNO

    SCCM does not seem to be discovering the values against these custom attributes (I have added them into the AD System Discovery & run full discovery), so I'm thinking that SCCM is having trouble with the "format" in the same way as PS5?

    The only differences I can see between the extattrib7 & the custom attributes is that extAttribs are included in global catalog & indexed, whereas my custom attributes are not.

    Any ideas please?

  • #95970

    Don Jones

    If you go into the actual AD schema, are this single-valued or multi-valued attributes in the schema?

  • #96350

    Eddie Cooper

    Sorry for the delay in updating on here.

    They are all single value attributes in structure as well as value... & they have now decided to get on with syncing from AD to SCCM. So the main issue is no longer a problem, but I am still wondering why PS5 reports the attribute content differently to PS3 when they are single valued in AD.

    Thanks! 🙂

You must be logged in to reply to this topic.