Hey Deji. Obviously this whole chain is about ALs which we
all know but I did want to comment on your script so you can make a quick change
to make it even better...
You are following this algorithm
1. Get a list of all users in an OU
2. Loop through all users
3. Return the user's proxy
addresses
4. If the user has a proxy address, display the
user
For a domain with 100 users you would be doing 101 LDAP
calls when in fact you could do it all with one single call.
Simple change your initial filter to ask for all users with
proxyAddresses=*; this will only return users who have a value in the
proxyAddresses attribute. Now if you want to verify the information then you can
return those in the intial search and then do your verification logic. This
would cut down tremendously on overhead for the script. Alternatively if you are
just trying to find any users with a SNADS proxyAddress or an X400 proxy address
you can make your filter even more succinct by specifying proxyAddresses=SNADS:*
or proxyAddresses=X400:*.
Thanks for sharing the script though. The more people that
do this, the better off everyone will be.
joe
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of deji Agba
Sent: Wednesday, May 05, 2004 12:52 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Simple LDAP Query
Sincerely,
D�j� Ak�m�l�f�, MCSE MCSA MCP+I
D�j� Ak�m�l�f�, MCSE MCSA MCP+I
Microsoft MVP
- Directory Services
www.readymaids.com - we know
IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about Yesterday? -anon
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about Yesterday? -anon
From: Michael B. Smith
Sent: Tue 5/4/2004 2:38 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Simple LDAP Query
I'm obviously
missing something simple...
How do I construct a
query to return all the objects in a particular OU?
(To be specific, I
want to return everything in an OU that is mail-enabled -- but I can do the rest
given the syntax to search only a particular OU.)
Thanks
