AD Query Attribute

Discussion in 'Active Directory' started by IT BA, Jan 22, 2009.

  1. IT BA

    IT BA Guest

    Hello All,

    I've run a simple AD query for All Groups with the Managed By attribute
    present. I get the results I want, but I'd like to have the results display
    the Managed By value for each of those groups.

    Right now, only the Name, Type, and Description of the group displays. When
    I go into Add/Remove Columns, the Managed By attribute doesn't appear.

    Any help would be appreciated, as it will be very tedious going into each of
    the returned groups to find out the manager.

    Thanks in advance.

    IT BA, Jan 22, 2009
    1. Advertisements

  2. Steve,

    How did you go about this? What was the tool you used? I used freeware
    ADfind from to do this:

    adfind -b "DC=intern,DC=frickelsoft,DC=net" -f
    "(&(objectCategory=group)(managedBy=*))" dn, managedBy, <more attributes>

    and it outputs:



    Florian Frommherz [MVP], Jan 22, 2009
    1. Advertisements

  3. IT BA

    Masterplan Guest


    Beside what Florian said, you can also use this one-line script:

    dsquery * -filter "(&(objectclass=group)(managedBy=*))" -Attr sAMAccountName
    managedBy -Limit 0
    Masterplan, Jan 23, 2009
  4. IT BA

    IT BA Guest

    Thanks. In both those cases, will the queries also return groups with the
    managedBy attribute blank? I want to avoid that.

    IT BA, Jan 23, 2009
  5. Howdie!

    Using * as the filter value means "any value present" or "not null" - so
    no, it does not print the groups without a managedBy value set.


    Florian Frommherz [MVP], Jan 23, 2009
  6. IT BA

    IT BA Guest

    Thanks a million!

    IT BA, Jan 23, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.