Question : How can I find Distinguish Name(DN) for a user in Active Directory

How can I find Distinguish Name(DN) for a user in Active Directory

EX:

/O=GROUP/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=AAKASHK
/O=GROUP/OU=SECOUND ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=ABDULLAHS


Answer : How can I find Distinguish Name(DN) for a user in Active Directory


Should be in ADSIEdit under the properties for each user. It'll list all attributes for the account in question. See attached pictures, although the value isn't set for me because I have no Exchange Installation on that domain.

Anyway, if a script is easier, then this is very simple (in VbScript, so would need saving as .vbs).

Where the user is in AD like this:

YourDomain.local\SomeFolder\Sam Doe

Chris
1:
2:
3:
4:
Set objUser = GetObject("LDAP://CN=Sam Doe,OU=Some Folder,DC=YourDomain,DC=local")
 
WScript.Echo objUser.Get("legacyExchangeDN")
Open in New Window Select All
 
ADSIEdit.msc - User
ADSIEdit.msc - User
 
 
ADSIEdit.msc - User Properties
ADSIEdit.msc - User Properties
 
Random Solutions  
 
programming4us programming4us