How to find AD attributes that are empty for all users in AD

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Curtis Smith Curtis Smith 5 months ago.

  • Author
    Posts
  • #46873
    Profile photo of Alexander Dubel
    Alexander Dubel
    Participant

    Hi, guys.
    I am sure that some attributes (like FAX or City for e.g.) are empty for all users in my Active Directory.
    Is it possible to find (and to count) users AD attributes that are empty for all users in AD?

  • #46876
    Profile photo of TomBaker
    TomBaker
    Participant

    Get-aduser -ldapfilter '(!(city=*))' -properties city

  • #46884
    Profile photo of Curtis Smith
    Curtis Smith
    Participant

    To Expand on Tom's reply, pipe it into Measure-Object to get a count

    Get-aduser -ldapfilter '(!(city=*))' -properties city | measure-object

You must be logged in to reply to this topic.