Jason Benway wrote:
We have a large flat AD forest, with separate name spaces
(a.com,b.com,c.com,etc)

I have a few script questions.
First is there a way to retrieve each domain name, using winnt: doesn't work
Second, if I use GC, I can read information on all objects, but how can I
limit it so I can query only 1 domain at a time. If I use DC I have to query
a different DC for each domain.

Try to use query for LDAP://domain.com, for example:

SELECT samAccountName, distinguishedName FROM LDAP://domain.com WHERE objectCategory='Person' and objectClass='user'

or in LDAP syntax:
<LDAP://domain.com>;(objectCategory=person)(objectClass=user); dn, samAccountname, Name, WhenCreated"


--
Tomasz Onyszko [MVP]
[EMAIL PROTECTED]
http://www.w2k.pl

List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to