locked
Using Get-ADUser while Filtering on Custom Attribute RRS feed

  • Question

  • We have custom AD Attribute called "PhysicianNumber" and I want to pull all users that have that field populated. This is what I thought should work:

    Get-ADUser -Filter {PhysicianNumber -ne ""}

    This gives me errors apparently because this is a custom attribute. So... how else can I pull this data? Seem this should be pretty simple, but I've been googling the interwebs for the past 15 minutes and I still got nothing.

    Thanks,

    -Cacophony

    Tuesday, January 8, 2013 3:47 PM

Answers

  • Try this filter:

    Get-ADUser -Filter {PhysicianNumber -like "*"}

    Tuesday, January 8, 2013 6:22 PM

All replies

  • Try this filter:

    Get-ADUser -Filter {PhysicianNumber -like "*"}

    Tuesday, January 8, 2013 6:22 PM
  • Thanks! Exactly what I needed.
    Tuesday, January 8, 2013 7:43 PM