Thanks in advance!
Chris Bordeman
(&(objectClass=user)(samaccountname=chris))
Instead, I have the email address and need the real name ("Chris Bordeman")
and userID (chris).
Again thanks in advance!
"Chris Bordeman" <23...@gobleepyourselfspammers.com> wrote in message
news:e4XMUYMW...@TK2MSFTNGP02.phx.gbl...
> AD is no fun. I have LDP.exe but can't quite figure this one out.
>
> Thanks in advance!
>
> Chris Bordeman
>
Go to www.joeware.net and download adfind.exe, then:
adfind -default -f mail=who...@wherever.com displayName
If the user might have multiple email addresses where the one you want
isn't the primary (which gets stored in 'mail'), try:
adfind -default -f proxyaddresses=smtp:who...@whereever.com
(note the 'smtp:' prefix).
HTH,
Wayne Tilton
"Wayne Tilton" <Wayne_...@NoSpam.Yahoo.com> wrote in message
news:Xns9CB38BED3...@207.46.248.16...
"(&(objectClass=user)(mail=ch...@nowhere.com))"
"Chris Bordeman" <23...@gobleepyourselfspammers.com> wrote in message
news:emSbWtNW...@TK2MSFTNGP02.phx.gbl...
Chris,
Glad you figured that out, but the 'best' query would be:
(&(objectCategory=Person)(objectClass=User)(mail=ch...@nowhere.com))
The reason is that until Windows 2008 (or was it Exchange 2007?) the
objectClass attribute wasn't indexed, so searching by objectClass isn't
very efficient.
Wayne
"Wayne Tilton" <Wayne_...@NoSpam.Yahoo.com> wrote in message
news:Xns9CB4741B6...@207.46.248.16...
Normally, if an index is available it will be used to locate the object and
if multiple indexes are, only the best one is selected.
If you a DA, you can use adfind or LDP with the stats option to find out!
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"