Location: List Archives

List Archives

This forum is an archive of all posts to our mailing list over the past few years.  The forum is set read only therefore to contribute you will need to join our list community.  See more info about this here.

 

When subscribed to the list you should use your standard email client to send your posts to ActiveDir@mail.activedir.org.

List Archives

Subject: [ActiveDir] LDAP query question
Prev Next
You are not authorized to post a reply.

AuthorMessages
tkernUser is Offline

Posts:6

06/28/2007 9:06 AM  
i have a mutli domain forest (8 domains) and i have some users which have accounts in more than one domain (same sAMAccountName).
how can i query via adfind or dsquery, etc for a list of all users in doamin A and domain B?

that is, out of 8 domains in my forest, i just want a list of users who have an account in 2 specific domains but NOT in only the one domain.
they have to exist in both.
should i filter on UPN?
or dn?

thanks
bdesmondUser is Offline

Posts:415

06/28/2007 9:35 AM  
Tom-

I tend to use an access database or a sql database somewhere for
this. Drop all your users from each domain in a separate table and then you run
a query like this:

SELECT * FROM DomainA WHERE sAMAccountName IN (SELECT
sAMAccountName FROM DomainB)

So DomainA is the table with all the domain A users, and DomainB
is the table with the domain B users and you have a column called
sAMAccountName in each. This will give you all the domain A data for users with
a matching samaccountname in DomainB.

I’d make sure you index the sAMAccountName field in both tables
if you have a lot of users or don’t feel like twiddling your thumbs for a
while. If you plan to do a lot of querying based on this data I would obtain a
installation of SQL 2000/2005 Enterprise and utilized the indexed views
feature. Your personal PC would be more than sufficient for this probably.

This is generally how I have historically done any AD or Exchange
reporting that wasn’t a simple export – just have SQL database lying around
somewhere that I bulk load from CSV exports and query.

Thanks,

Brian Desmond

brian@briandesmond.com

c - 312.731.3132

From:
ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-owner@mail.activedir.org] On
Behalf Of Tom Kern
Sent: Thursday, June 28, 2007 8:07 PM
To: activedirectory
Subject: [ActiveDir] LDAP query question

i have a mutli domain forest (8 domains) and i have some
users which have accounts in more than one domain (same sAMAccountName).

how can i query via adfind or dsquery, etc for a list of all
users in doamin A and domain B?

that is, out of 8 domains in my forest, i just want a list
of users who have an account in 2 specific domains but NOT in only the
one domain.

they have to exist in both.

should i filter on UPN?

or dn?

thanks
tkernUser is Offline

Posts:6

06/28/2007 9:48 AM  
cool!
that makes sense.

i guess i was foucused too much on the ldap piece and not how to manipulate the result.
thanks!!
On 6/28/07, Brian Desmond wrote:

Tom-

I tend to use an access database or a sql database somewhere for this. Drop all your users from each domain in a separate table and then you run a query like this:
SELECT * FROM DomainA WHERE sAMAccountName IN (SELECT sAMAccountName FROM DomainB)

So DomainA is the table with all the domain A users, and DomainB is the table with the domain B users and you have a column called sAMAccountName in each. This will give you all the domain A data for users with a matching samaccountname in DomainB.
I'd make sure you index the sAMAccountName field in both tables if you have a lot of users or don't feel like twiddling your thumbs for a while. If you plan to do a lot of querying based on this data I would obtain a installation of SQL 2000/2005 Enterprise and utilized the indexed views feature. Your personal PC would be more than sufficient for this probably.
This is generally how I have historically done any AD or Exchange reporting that wasn't a simple export – just have SQL database lying around somewhere that I bulk load from CSV exports and query.
Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132


From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Tom KernSent: Thursday, June 28, 2007 8:07 PM
To: activedirectorySubject: [ActiveDir] LDAP query question

i have a mutli domain forest (8 domains) and i have some users which have accounts in more than one domain (same sAMAccountName).

how can i query via adfind or dsquery, etc for a list of all users in doamin A and domain B?

that is, out of 8 domains in my forest, i just want a list of users who have an account in 2 specific domains but NOT in only the one domain.

they have to exist in both.

should i filter on UPN?

or dn?

thanks
RickyLeeUser is Offline

Posts:0

06/29/2007 1:41 AM  
Re: [ActiveDir] LDAP query question


I am using SQL DB as well together with SQL Reporting Service. This separates data query and report presentation.
Ricky Lee
IT Infrastructure Analyst
The Walt Disney International
Direct: +852 2203-2910
email: ricky.lee@disney.com
--------------------------
Sent from my Wireless Handheld
----- Original Message -----
From: ActiveDir-owner@mail.activedir.org
To: ActiveDir@mail.activedir.org
Sent: Fri Jun 29 09:48:42 2007
Subject: Re: [ActiveDir] LDAP query question

cool!
that makes sense.

i guess i was foucused too much on the ldap piece and not how to manipulate the result.
thanks!!
On 6/28/07, Brian Desmond wrote:

Tom-

I tend to use an access database or a sql database somewhere for this. Drop all your users from each domain in a separate table and then you run a query like this:

SELECT * FROM DomainA WHERE sAMAccountName IN (SELECT sAMAccountName FROM DomainB)

So DomainA is the table with all the domain A users, and DomainB is the table with the domain B users and you have a column called sAMAccountName in each. This will give you all the domain A data for users with a matching samaccountname in DomainB.

I'd make sure you index the sAMAccountName field in both tables if you have a lot of users or don't feel like twiddling your thumbs for a while. If you plan to do a lot of querying based on this data I would obtain a installation of SQL 2000/2005 Enterprise and utilized the indexed views feature. Your personal PC would be more than sufficient for this probably.

This is generally how I have historically done any AD or Exchange reporting that wasn't a simple export – just have SQL database lying around somewhere that I bulk load from CSV exports and query.

Thanks,

Brian Desmond

brian@briandesmond.com

c - 312.731.3132

From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Tom Kern
Sent: Thursday, June 28, 2007 8:07 PM
To: activedirectory
Subject: [ActiveDir] LDAP query question

i have a mutli domain forest (8 domains) and i have some users which have accounts in more than one domain (same sAMAccountName).

how can i query via adfind or dsquery, etc for a list of all users in doamin A and domain B?

that is, out of 8 domains in my forest, i just want a list of users who have an account in 2 specific domains but NOT in only the one domain.

they have to exist in both.

should i filter on UPN?

or dn?

thanks
TGUser is Offline

Posts:101

06/29/2007 11:48 AM  
I heavily use logparser for situations
like that and loving it. It obligates the need to have a SQL database.
Still use the SQL syntax, but can go against text files, evt, etc...
For large volumes of data SQL, of course, is a better chose. But
for quick and dirty logparser rules.

Thank you, Tony.

Tony Gordon, Windows 2003 & 2000 MCSE,
Windows 2003 MCSA
tony dot gordon at hewitt dot com
Windows Server Infrastructure
Phone: 847.295.5000 x14534
Fax: 847.295.8877
Hewitt
Associates



"Brian Desmond"


Sent by: ActiveDir-owner@mail.activedir.org
06/28/2007 08:35 PM

Please respond to
ActiveDir@mail.activedir.org


To
"ActiveDir@mail.activedir.org"

cc

Subject
RE: [ActiveDir] LDAP query question
Tom-

I tend to use an
access database or a sql database somewhere for this. Drop all your users
from each domain in a separate table and then you run a query like this:

SELECT * FROM DomainA
WHERE sAMAccountName IN (SELECT sAMAccountName FROM DomainB)

So DomainA is the
table with all the domain A users, and DomainB is the table with the domain
B users and you have a column called sAMAccountName in each. This will
give you all the domain A data for users with a matching samaccountname
in DomainB.

I’d make sure you
index the sAMAccountName field in both tables if you have a lot of users
or don’t feel like twiddling your thumbs for a while. If you plan to do
a lot of querying based on this data I would obtain a installation of SQL
2000/2005 Enterprise and utilized the indexed views feature. Your personal
PC would be more than sufficient for this probably.

This is generally
how I have historically done any AD or Exchange reporting that wasn’t
a simple export – just have SQL database lying around somewhere that I
bulk load from CSV exports and query.

Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132

From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Tom Kern
Sent: Thursday, June 28, 2007 8:07 PM
To: activedirectory
Subject: [ActiveDir] LDAP query question

i have a mutli domain forest (8
domains) and i have some users which have accounts in more than one domain
(same sAMAccountName).
how can i query via adfind or dsquery,
etc for a list of all users in doamin A and domain B?

that is, out of 8 domains in my
forest, i just want a list of users who have an account in 2 specific
domains but NOT in only the one domain.
they have to exist in both.
should i filter on UPN?
or dn?

thanks

The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient
is strictly prohibited.
rboswellUser is Offline

Posts:20

06/29/2007 11:51 AM  
You can do this in PowerShell and VBScript without having
to install and configure a database.

Richard Boswell | Systems
Engineer | Windows Server Engineering | Visa | 12357-C Riata Trace Pkwy, Austin, TX
78727 | Work - (512) 506-4643 | Cell - (512) 750-4583

From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Tony
GordonSent: Friday, June 29, 2007 10:48 AMTo:
ActiveDir@mail.activedir.orgSubject: RE: [ActiveDir] LDAP query
question
I heavily use logparser for
situations like that and loving it. It obligates the need to have a SQL
database. Still use the SQL syntax, but can go against text files, evt,
etc... For large volumes of data SQL, of course, is a better chose.
But for quick and dirty logparser rules.Thank you, Tony.





Tony Gordon, Windows 2003 & 2000 MCSE,
Windows 2003 MCSAtony dot gordon at hewitt dot comWindows Server
InfrastructurePhone: 847.295.5000 x14534Fax:
847.295.8877Hewitt Associates





"Brian Desmond"
Sent by: ActiveDir-owner@mail.activedir.org
06/28/2007 08:35 PM




Please respond
toActiveDir@mail.activedir.org





To
"ActiveDir@mail.activedir.org"



cc



Subject
RE: [ActiveDir] LDAP query
question




Tom- I tend to use an access database or
a sql database somewhere for this. Drop all your users from each domain in a
separate table and then you run a query like this: SELECT * FROM DomainA WHERE
sAMAccountName IN (SELECT sAMAccountName FROM DomainB) So DomainA is the table with all the
domain A users, and DomainB is the table with the domain B users and you have a
column called sAMAccountName in each. This will give you all the domain A data
for users with a matching samaccountname in DomainB. I’d make sure you index the
sAMAccountName field in both tables if you have a lot of users or don’t feel
like twiddling your thumbs for a while. If you plan to do a lot of querying
based on this data I would obtain a installation of SQL 2000/2005 Enterprise and
utilized the indexed views feature. Your personal PC would be more than
sufficient for this probably. This is generally how I have historically done any AD or
Exchange reporting that wasn’t a simple export – just have SQL database lying
around somewhere that I bulk load from CSV exports and query.

Thanks,
Brian Desmond
brian@briandesmond.com c - 312.731.3132 From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Tom
KernSent: Thursday, June 28, 2007 8:07 PMTo:
activedirectorySubject: [ActiveDir] LDAP query question
i have a mutli domain forest (8 domains) and i
have some users which have accounts in more than one domain (same
sAMAccountName). how can i query
via adfind or dsquery, etc for a list of all users in doamin A and domain
B? that is, out of 8 domains in my forest, i just
want a list of users who have an account in 2 specific domains but NOT in
only the one domain. they have to
exist in both. should i filter on
UPN? or dn? thanks
The information contained in this e-mail and any
accompanying documents may contain information that is confidential or otherwise
protected from disclosure. If you are not the intended recipient of this
message, or if this message has been addressed to you in error, please
immediately alert the sender by reply e-mail and then delete this message,
including any attachments. Any dissemination, distribution or other use of the
contents of this message by anyone other than the intended recipient is strictly
prohibited.
TGUser is Offline

Posts:101

06/29/2007 12:21 PM  
That is what I get for accepting spell
checker suggestions without looking closely. obligates should have
been obviate.

Thank you, Tony.

Tony Gordon, Windows 2003 & 2000 MCSE,
Windows 2003 MCSA
tony dot gordon at hewitt dot com
Windows Server Infrastructure
Phone: 847.295.5000 x14534
Fax: 847.295.8877
Hewitt
Associates



Tony Gordon/National/Hewitt
Associates@Hewitt Associates NA

Sent by: ActiveDir-owner@mail.activedir.org
06/29/2007 10:48 AM

Please respond to
ActiveDir@mail.activedir.org


To
ActiveDir@mail.activedir.org
cc

Subject
RE: [ActiveDir] LDAP query question

I heavily use logparser for situations like that and loving it. It
obligates the need to have a SQL database. Still use the SQL syntax,
but can go against text files, evt, etc... For large volumes of data
SQL, of course, is a better chose. But for quick and dirty logparser
rules.

Thank you, Tony.

Tony Gordon, Windows 2003 & 2000 MCSE,
Windows 2003 MCSA
tony dot gordon at hewitt dot com
Windows Server Infrastructure
Phone: 847.295.5000 x14534
Fax: 847.295.8877
Hewitt
Associates



"Brian Desmond"


Sent by: ActiveDir-owner@mail.activedir.org
06/28/2007 08:35 PM

Please respond to
ActiveDir@mail.activedir.org


To
"ActiveDir@mail.activedir.org"

cc

Subject
RE: [ActiveDir] LDAP query question


Tom-

I tend to use an access database or a sql database somewhere for this.
Drop all your users from each domain in a separate table and then you run
a query like this:

SELECT * FROM DomainA WHERE sAMAccountName IN (SELECT sAMAccountName FROM
DomainB)

So DomainA is the table with all the domain A users, and DomainB is the
table with the domain B users and you have a column called sAMAccountName
in each. This will give you all the domain A data for users with a matching
samaccountname in DomainB.

I’d make sure you index the sAMAccountName field in both tables if you
have a lot of users or don’t feel like twiddling your thumbs for a while.
If you plan to do a lot of querying based on this data I would obtain a
installation of SQL 2000/2005 Enterprise and utilized the indexed views
feature. Your personal PC would be more than sufficient for this probably.


This is generally how I have historically done any AD or Exchange reporting
that wasn’t a simple export – just have SQL database lying around somewhere
that I bulk load from CSV exports and query.

Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132

From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-owner@mail.activedir.org]
On Behalf Of Tom Kern
Sent: Thursday, June 28, 2007 8:07 PM
To: activedirectory
Subject: [ActiveDir] LDAP query question

i have a mutli domain forest (8 domains) and i have some users which have
accounts in more than one domain (same sAMAccountName).

how can i query via adfind or dsquery, etc for a list of all users in doamin
A and domain B?

that is, out of 8 domains in my forest, i just want a list of users who
have an account in 2 specific domains but NOT in only the one domain.

they have to exist in both.
should i filter on UPN?
or dn?

thanks


The information contained in this e-mail and any accompanying
documents may contain information that is confidential or otherwise protected
from disclosure. If you are not the intended recipient of this message,
or if this message has been addressed to you in error, please immediately
alert the sender by reply e-mail and then delete this message, including
any attachments. Any dissemination, distribution or other use of the contents
of this message by anyone other than the intended recipient is strictly
prohibited.

The information contained in this e-mail and any accompanying
documents may contain information that is confidential or otherwise protected
from disclosure. If you are not the intended recipient of this message,
or if this message has been addressed to you in error, please immediately
alert the sender by reply e-mail and then delete this message, including
any attachments. Any dissemination, distribution or other use of the contents
of this message by anyone other than the intended recipient is strictly
prohibited.


The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient
is strictly prohibited.
seganUser is Offline

Posts:0

06/29/2007 12:34 PM  
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}


st1\:*{behavior:url(#default#ieooui) }









Obviously, you were not obligated to
obviate!

(OUCH! My head hurt on that one…)

Steve Egan

Systems/Network Engineer

Purcell Systems

From:
ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Tony Gordon
Sent: Friday, June 29, 2007 9:21
AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] LDAP
query question


That is what I get for accepting spell checker
suggestions without looking closely. obligates should have been obviate.

Thank you, Tony.





Tony Gordon, Windows 2003 & 2000 MCSE, Windows 2003
MCSA
tony dot gordon at hewitt dot com
Windows Server Infrastructure
Phone: 847.295.5000 x14534
Fax: 847.295.8877
Hewitt
Associates









Tony Gordon/National/Hewitt
Associates@Hewitt Associates NA

Sent
by: ActiveDir-owner@mail.activedir.org
06/29/2007 10:48 AM



Please
respond to
ActiveDir@mail.activedir.org









To


ActiveDir@mail.activedir.org





cc







Subject


RE: [ActiveDir] LDAP query question
























I heavily use logparser for situations like that and loving it. It
obligates the need to have a SQL database. Still use the SQL syntax, but
can go against text files, evt, etc... For large volumes of data SQL, of
course, is a better chose. But for quick and dirty logparser rules.

Thank you, Tony.





Tony Gordon, Windows 2003 & 2000 MCSE, Windows 2003
MCSA
tony dot gordon at hewitt dot com
Windows Server Infrastructure
Phone: 847.295.5000 x14534
Fax: 847.295.8877
Hewitt Associates








"Brian Desmond"


Sent by: ActiveDir-owner@mail.activedir.org
06/28/2007 08:35 PM



Please
respond to
ActiveDir@mail.activedir.org









To


"ActiveDir@mail.activedir.org"






cc







Subject


RE: [ActiveDir] LDAP query question



















Tom-

I tend to use an access database or a sql database somewhere for this. Drop all
your users from each domain in a separate table and then you run a query like
this:

SELECT * FROM DomainA WHERE sAMAccountName IN (SELECT sAMAccountName FROM
DomainB)

So DomainA is the table with all the domain A users, and DomainB is the table
with the domain B users and you have a column called sAMAccountName in each.
This will give you all the domain A data for users with a matching
samaccountname in DomainB.

I’d make sure you index the sAMAccountName field in both tables if you
have a lot of users or don’t feel like twiddling your thumbs for a while.
If you plan to do a lot of querying based on this data I would obtain a
installation of SQL 2000/2005 Enterprise
and utilized the indexed views feature. Your personal PC would be more than sufficient
for this probably.

This is generally how I have historically done any AD or Exchange reporting
that wasn’t a simple export – just have SQL database lying around
somewhere that I bulk load from CSV exports and query.

Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132

From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On
Behalf Of Tom Kern
Sent: Thursday, June 28, 2007 8:07 PM
To: activedirectory
Subject: [ActiveDir] LDAP query question

i have a mutli domain forest (8 domains) and i have some users which have
accounts in more than one domain (same sAMAccountName).
how can i query via adfind or dsquery, etc for a list of all users in doamin A
and domain B?

that is, out of 8 domains in my forest, i just want a list of users who have an
account in 2 specific domains but NOT in only the one domain.
they have to exist in both.
should i filter on UPN?
or dn?

thanks




The information contained in this e-mail and any accompanying documents
may contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if this
message has been addressed to you in error, please immediately alert the sender
by reply e-mail and then delete this message, including any attachments. Any
dissemination, distribution or other use of the contents of this message by
anyone other than the intended recipient is strictly prohibited.



The information contained in this e-mail and any accompanying documents
may contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if this
message has been addressed to you in error, please immediately alert the sender
by reply e-mail and then delete this message, including any attachments. Any
dissemination, distribution or other use of the contents of this message by
anyone other than the intended recipient is strictly prohibited.



The information contained in this e-mail and any
accompanying documents may contain information that is confidential or
otherwise protected from disclosure. If you are not the intended recipient of
this message, or if this message has been addressed to you in error, please
immediately alert the sender by reply e-mail and then delete this message,
including any attachments. Any dissemination, distribution or other use of the
contents of this message by anyone other than the intended recipient is
strictly prohibited.
bdesmondUser is Offline

Posts:415

06/29/2007 12:53 PM  
P {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}


Yeah if you don't mind the slower speed of parsing the log file that's likely a good alternative. I've not used log parser but have seen the SQL like syntax it does.

I tend to gravitate towards SQL since I'm comfortable with T-SQL and it's fast and I can make use of things like indexed views when I start building complicated reports. I can also schedule DTS jobs
and reports to get built nightly if I want to pretty easily. Again just a being familiar with it for a few versions thing.
Thanks,

Brian Desmond
brian@briandesmond.com

c - 312.731.3132

From: ActiveDir-owner@mail.activedir.org [ActiveDir-owner@mail.activedir.org] On Behalf Of Tony Gordon [tony.gordon@hewitt.com]
Sent: Friday, June 29, 2007 11:48 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] LDAP query question


I heavily use logparser for situations like that and loving it. It obligates the need to have a SQL database. Still use the SQL syntax, but can go against text files, evt, etc... For large volumes of data SQL, of course,
is a better chose. But for quick and dirty logparser rules.

Thank you, Tony.

Tony Gordon, Windows 2003 & 2000 MCSE, Windows 2003 MCSA
tony dot gordon at hewitt dot com
Windows Server Infrastructure
Phone: 847.295.5000 x14534
Fax: 847.295.8877
Hewitt Associates



"Brian Desmond"
Sent by: ActiveDir-owner@mail.activedir.org
06/28/2007 08:35 PM


Please respond to
ActiveDir@mail.activedir.org



To

"ActiveDir@mail.activedir.org"


cc

Subject

RE: [ActiveDir] LDAP query question


Tom-

I tend to use an access database or a sql database somewhere for this. Drop all your users from each domain in a separate table and then you run a query like this:


SELECT * FROM DomainA WHERE sAMAccountName IN (SELECT sAMAccountName FROM DomainB)


So DomainA is the table with all the domain A users, and DomainB is the table with the domain B users and you have a column called sAMAccountName in each. This will give you all the domain A data for users
with a matching samaccountname in DomainB.

I’d make sure you index the sAMAccountName field in both tables if you have a lot of users or don’t feel like twiddling your thumbs for a while. If you plan to do a lot of querying based on this data I would
obtain a installation of SQL 2000/2005 Enterprise and utilized the indexed views feature. Your personal PC would be more than sufficient for this probably.


This is generally how I have historically done any AD or Exchange reporting that wasn’t a simple export – just have SQL database lying around somewhere that I bulk load from CSV exports and query.


Thanks,
Brian Desmond
brian@briandesmond.com


c - 312.731.3132


From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-owner@mail.activedir.org]
On Behalf Of Tom Kern
Sent: Thursday, June 28, 2007 8:07 PM
To: activedirectory
Subject: [ActiveDir] LDAP query question

i have a mutli domain forest (8 domains) and i have some users which have accounts in more than one domain (same sAMAccountName).

how can i query via adfind or dsquery, etc for a list of all users in doamin A and domain B?


that is, out of 8 domains in my forest, i just want a list of users who have an account in 2 specific domains but NOT in only the one domain.

they have to exist in both.
should i filter on UPN?
or dn?

thanks


The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message
has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended
recipient is strictly prohibited.
You are not authorized to post a reply.
Forums >ActiveDir Mail List Archive >List Archives > [ActiveDir] LDAP query question



ActiveForums 3.7
AdventNet Banner
Friends

Friends

Namescape
Members

Members

MembershipMembership:
Latest New UserLatest:kosciesza69
New TodayNew Today:3
New YesterdayNew Yesterday:1
User CountOverall:4319

People OnlinePeople Online:
VisitorsVisitors:75
MembersMembers:0
TotalTotal:75

Online NowOnline Now:

Ads

Copyright 2008 ActiveDir.org
Terms Of Use