Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AD reporting

Status
Not open for further replies.

RedHeadedStepITChild

IS-IT--Management
May 31, 2007
46
US
I've searched the net and this site hi and low, but have been unable to piece an answer together that gets me what I need.

I am trying to create a report, that shows me the user's name, telphone number, and department in a particular group in Active Directory. I have no problem getting the user info. I am able to query the different groups in my environment, but unable to tie the two together.

Here is what I have so far (These queries might help those of you that land on this page via search engine to get started with using Crystal to report on AD).

User Info Query: (returns all user objects and corresponding attributes - set up as command_1 in Crystal)
select cn, telephoneNumber, manager, mobile, from 'LDAP://DC=[myDC],DC=local' Where objectClass = 'user' and objectCategory = 'person'

Group Query: (returns all groups in my enviroment - setup as command_2 in crystal)
select CN, from 'LDAP://DC=[myDC], DC=local' where objectCategory = 'group'

I was thinking that I could use Select CN, member in the group query to get a list of each user that is a member of that particular group and then link command_1 and command_2 where CN = member. However, Select CN,member does not return anything but the groups.

Once I can get all of the groups to return their members, then I can update my query to select only a certain group.

Anyone have any ideas? If no ideas, I hope this helps someone else at least to get started in reporting on AD.

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top