Forum Discussion

JasonT77's avatar
JasonT77
Copper Contributor
Jul 26, 2023

Exporting AD User Attributes

I'm using PowerShell to export selected attributes of all our users in a specific OU in AD. It's mostly working but for some reason several attributes aren't exporting correctly. The personalPager at...
  • LainRobertson's avatar
    Jul 26, 2023

    JasonT77 

     

    Hi, Jason.

     

    There's two possibilities here:

     

    1. You've misspelled the attribute names in your "Select-Object" statement; and/or
    2. The account you're using does not have permission to read those attributes (which includes if the attributes are marked as confidential.)

     

    To check point 1 isn't a problem, run just the first part of your statement:

     

    get-aduser -filter * -Properties * -SearchBase "OU=Standard Users,OU=Users,OU=Organisation,DC=wdea,DC=local"

     

    If you see the attributes listed with values, then you've simply made a typo in the Select-Object clause.

     

    If you see the attributes listed but without value(s), then either:

     

    1. The attribute really holds no value for that object; and/or
    2. The account you're querying with does not have permission to read that attribute; and/or
    3. The attribute is marked as confidential.

     

    Obviously, I can't check if your custom attributes are marked as confidential, but the default for personalPager is that it's not marked as confidential, so I'm inclined to think it's point 2 (permissions of the querying account) above.

     

    Cheers,

    Lain

Share

Resources