I need to find the location of the user object in AD based on the Logon Name
IE:
I have:
JDoe123 (the logon name)
I need:
LDAP://cn=JohnDoe,ou=users,ou=aaa,ou=bbb,ou=ccc,DC=xxx
thanks!
I need to find the location of the user object in AD based on the Logon Name
IE:
I have:
JDoe123 (the logon name)
I need:
LDAP://cn=JohnDoe,ou=users,ou=aaa,ou=bbb,ou=ccc,DC=xxx
thanks!
By the way - a clarification:
i dont know what ou the object is in, so i can not assume it lives in
ou=users,ou=aaa,ou=bbb,ou=ccc,DC=xxx
"pk" <pk@newsgroup> wrote in message
news:1F6CD335-545E-48DE-80DB-0E2E351AA177@newsgroupYou can use the NameTranslate object for this. Details at this link:
>I need to find the location of the user object in AD based on the Logon
>Name
>
> IE:
> I have:
> JDoe123 (the logon name)
>
> I need:
> LDAP://cn=JohnDoe,ou=users,ou=aaa,ou=bbb,ou=ccc,DC=xxx
>
> thanks!
http://www.rlmueller.net/NameTranslateFAQ.htm
#6 is a quick example to convert the "pre-Windows 2000 logon" name into the
Distinguished Name. #16 shows how to retrieve the NetBIOS name of the
domain, which is needed for #6 if you don't hard code the domain name.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Richard,
As usual, you are a genius! This worked perfectly.
I want to thank you very much for your participation in this newsgroup, and
your informative web page. I have learned sooo much from your contributions,
and you have saved me many, many hours spinning my wheels on scripting
challenges.
-PK
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| win 7 new to accounts help - How to Fix the Error The User ProfileService failed the logon User profile cannot be loaded | inventor1984 | Server General | 2 | 24 Jan 2010 |
| Services Fail with Error Logon failure: the user has not been granted the requested logon type at this computer. | Zaz | Server General | 5 | 06 Nov 2009 |
| Logon Failure: the user has not granted the requested logon type at this | Junior | Vista networking & sharing | 2 | 26 Nov 2008 |
| Logon failure: the user has not been granted the requested logon typeat this computer. | shil | .NET General | 0 | 17 Mar 2008 |
| need to have a web based time sheet appear at logon and logoff | Skamionek | Vista security | 0 | 13 Mar 2008 |