Knowledgebase article 155

Getting the Full DN of a user in Active Directory


This is the commands to get the Full DN of a user in Active Directory

Getting the Full DN of a user in:

 

Active Directory:

 

From the Active Directory server, open a Command Prompt. 

 

>dsquery user

 

Example of output:

 

>dsquery user

"CN=Test User, OU=Support,OU=Users,DC=Example,DC=Exp"
"CN=Michael Jones, OU=Support,OU=Users,DC=Example,DC=Exp"
"CN=Jon Smith, OU=Support,OU=Users,DC=Example,DC=Exp"
"CN=John Doe, OU=Support,OU=Users,DC=Example,DC=Exp"
"CN=Jane Doe, OU=Support,OU=Users,DC=Example,DC=Exp"

 

This command lists the Full DN on all users and in all OUs.

------------------------------------------------------------------------------

 

>dsquery user -name "name"

 

Example of output:

 

>dsquery user -name "John Doe"

"CN=John Doe, OU=Support,OU=Users,DC=Example,DC=Exp"

 

This command will display the Full DN for the user "name"

------------------------------------------------------------------------------

 

>dsquery user -name "john*

 

>dsquery user -name "John*

"CN=John Doe, OU=Support,OU=Users,DC=Example,DC=Exp"

"CN=John Smith, OU=Support,OU=Users,DC=Example,DC=Exp"

"CN=John Johnson, OU=Support,OU=Users,DC=Example,DC=Exp"

 

This command  will do a Wild Card search

 

Group eHD Standard Support Last modified Nov 13, 2019 Type Public Viewed 2567