?
Solved

active directory query

Posted on 2006-10-30
5
Medium Priority
?
228 Views
Last Modified: 2010-04-18
I am trying to create a query in active directory that will show me the members of a certain group.  Anyone know how to do this?
0
Comment
Question by:steveLaMi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 29

Accepted Solution

by:
mass2612 earned 2000 total points
ID: 17839606
Hi,

Try this vbscript just save as a vbscript and edit the group name, OU and domain info.

On Error Resume Next
 
Set objGroup = GetObject _
  ("LDAP://cn=GroupName,ou=Sales,dc=mydomain,dc=com")
objGroup.GetInfo
 
arrMemberOf = objGroup.GetEx("member")
 
WScript.Echo "Members:"
For Each strMember in arrMemberOf
    WScript.echo strMember
Next
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 17839619
dsget group "cn=Groupname,ou=OUname,DC=Domain,DC=Local" -members
0
 
LVL 14

Expert Comment

by:inbarasan
ID: 17840014
net group "groupname" will also show you the members of a group and this should be run on a DC

Hope this simple command helps you
0
 
LVL 10

Expert Comment

by:ryangorman
ID: 17840454
Lots of great answers. As a 0 point refinement to Jays submission.

dsquery group -name "groupname" | dsget group -members

0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 17840695
Show off!! **Grin** :-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question