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

Welcome Forums General PowerShell Q&A 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

 
Participant
2 years, 4 months ago.

  • Author
    Posts
  • #46873

    Participant
    Points: 1
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

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

  • #46884

    Participant
    Points: 0
    Rank: Member

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

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

The topic ‘How to find AD attributes that are empty for all users in AD’ is closed to new replies.