Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Query Active Directory

Posted on 2010-08-23
4
Medium Priority
?
858 Views
Last Modified: 2012-05-10
So I have gotten this far from information I have found but what I need to get is the names of the individuals that belong to this group and not the actual groupd name.  Don't query active Directory much so don't really know what I am doing.  How do i get the personnel whom belong to this group.

select cn, distinguishedName

from openquery(ADSI,'SELECT cn, distinguishedName

FROM "Sever Name"

WHERE objectCategory = ''group''

and CN = ''NGMN SEC J6 Voc''

')
0
Comment
Question by:kdeutsch
[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
  • 3
4 Comments
 
LVL 6

Accepted Solution

by:
Jerryuk007 earned 1600 total points
ID: 33501990
Have a look at spQueryAD (http://www.tek-tips.com/viewthread.cfm?qid=1273100&page=2)

I created that SP on MSSQL 2008, and then an SSIS to load the data into a MSSQL Table and sort them out the way I need.

Hope this helps.

Jerry
0
 

Author Comment

by:kdeutsch
ID: 33502973
Jerryuk007,

i will have to look into that for future use, currently I am trying to trace some Vb code that hits AD and gets the users that fall under this account and then emails them.  So I would have to put a lot of work into changing the whole thing, which I don't have time to do.  Just wondering if there is a way to get the users that belong to this distribution account.
0
 

Author Comment

by:kdeutsch
ID: 33513772
Came down to problem with account in AD, awarding Jerryuk007: some points for the code that will allow us to copy out Ad abojects.
0
 

Author Closing Comment

by:kdeutsch
ID: 33513799
Really was not the solution but wanted to award some popints for the code, but this question did not give me a choice to accept my solution and award points to others.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

660 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