Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Using DSQUERY to get the members of a Group in AD

Active Directory


Reply
 
Thread Tools Search this Thread
  #1  
Old 06-04-2005
Member
 
Join Date: Oct 2005
Posts: 67
Using DSQUERY to get the members of a Group in AD

I need to query members of Specific group in Active Directory and I need to do it using SQUERY command line tool. As I’m not so good in SQUERY can anyone please provide me correct syntax to use the same? Let me tell you that I have already tried few combinations such as “dsquery user OU=xxx, DC=yyy,DC=ZZZ” but none of them worked so far for me.

Somebody also suggested me to run dsquery group method, I ran but that too dint helped. So I need help from you all.

Reply With Quote
  #2  
Old 06-04-2005
Member
 
Join Date: Sep 2004
Posts: 140
RE: Using DSQUERY to get the members of a Group in AD

Here is the proper way of doing the same.

Quote:
C:\>dsget group "CN=GroupName,DC=domain-name,DC=com" -members
If you need to specify a server and/ or credentials, append the following on the end like this:

-s dc01 -u userName -p *
Reply With Quote
  #3  
Old 06-04-2005
Member
 
Join Date: Oct 2005
Posts: 67
Thanks a lot Stuartl. That Perfect

No problem! :-)

What command are you typing?

dsget group "CN=Group,CN=users,DC=domain,DC=ca" -members
Reply With Quote
  #4  
Old 07-02-2006
Member
 
Join Date: Oct 2005
Posts: 67
Re: Using DSQUERY to get the members of a Group in AD

Hey, i think there is something wrong with me. I'm running the same command as you suggested but it ends up saying

Quote:
dsget failed:A referral was returned from the server.
Any ideas what this is?
Reply With Quote
  #5  
Old 10-02-2006
Member
 
Join Date: Sep 2004
Posts: 150
Re: Using DSQUERY to get the members of a Group in AD

Are you sure you ran the correct command because the one mentioned above seems perfect to me as well. I am not getting why it is not working for you. Are you sure your domain is different to your DNS domain?

Try the same thing with adfind

adfind -b cn=group,cn=users,dc=domain-name,dc=com member -nodn
Reply With Quote
  #6  
Old 11-11-2009
Member
 
Join Date: Nov 2009
Posts: 1
Re: Using DSQUERY to get the members of a Group in AD

Hi Paul,

Sorry, Can you help me to give a dsquery command to get all inactive domain clients from specific OU?

Thanks,
Nap
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Using DSQUERY to get the members of a Group in AD"
Thread Thread Starter Forum Replies Last Post
Listing members of Group with >1500 members Umesh Thakur Windows Server Help 11 03-02-2012 05:29 AM
Display members of a group with more than 1500 members Simon G Windows Server Help 5 25-10-2011 01:35 PM
Unable to run dsquery / dsget for large number of group members Dhananjay Active Directory 2 28-02-2010 08:30 PM
dsquery to list members of group joey Windows Server Help 1 05-11-2008 08:43 AM
Export Group Members seankil Windows Server Help 4 09-04-2008 10:05 PM


All times are GMT +5.5. The time now is 04:47 AM.