Tuesday, November 17, 2015

Checking for the Presence of an Active Directory Attribute with ActiveNav

There are many Active Directory attributes that aren't present for every record of a certain type. For instance, I recently wanted to see how many users in an OU had a home directory mapped, so I needed to check each entry for the presence of a homeDirectory attribute. That can be accomplished with ActiveNav in two ways, both of which use the find command:

  1. find filter attribute like * finds all entries that have the attribute containing any value.
  2. find sort attribute str sorts the list of entries by the attribute, which has the side effect of removing entries that don't have the attribute from the result set.
I tested these on string values, but I'm not sure whether they'll work for System.__ComObject values.

No comments:

Post a Comment