Custom Query in AD

kam_uk
kam_uk used Ask the Experts™
on
Hi

We're running AD 2008. I have the ADUC application open and want to run a query so that I can be returned all members of a group named "Marketing"

Does anyone know how I would go about doing this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Neil RussellTechnical Development Lead

Commented:
If you have ADUC open then just click on the domain level, then click on the Find ICON and type in the name of the group.
When it finds the group, double click on the group and then on the properties page that that opens click on members.

Author

Commented:
Hi

Yep, but there are hundreds and I wanted to export this list to a CSV file of some sort?
Neil RussellTechnical Development Lead

Commented:
Ah why didnt you say :P

Get the Quest QAD Commadlets, They are free. ( http://www.quest.com/powershell/activeroles-server.aspx)

Then just use....

mkdir c:\temp
get-qadgroup | foreach-object {
get-qadgroupmember ($_) | export-csv "C:\temp\$($_.name).csv"
}

Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
:)

Thanks but do you know the commands to do this within ADUC? I won't be able to install ny software for the moment

Thanks agaoin!
Why not use vb script to pull the information. No need to install anything...
Refer to this link:   #30      Enumerate Group Membership to a CSV File

Author

Commented:
There must be an easy way to get this from ADUC without VB or installing anything? Surely it's just a simple LDAP query to get the members of Marketing?
Top Expert 2013
Commented:
Yes you can do it using an LDAP query in ADUC, you will need the full DN of the Marketing group.  In my screen shot I used a group I have called "eng1"

...notice the syntax

(memberof=cn=eng1,OU=Test Groups,DC=MKW2K8R2,DC=com)

Thanks

Mike
memberof-ADUC.png

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial