How to View an AD Object’s Canonical Name

Photo of author

By Victor Ashiedu

Published

Learn how to view and edit an Active Directory object’s Canonical Name with the options described in this guide.

Option 1: View Canonical Name From ADUC

1. Open Active Directory Users and Computers, click View and select Advanced Features.

Open-Active-Directory-Users-and-Computers-click-View-and-select-Advanced-Features
  1. After that, navigate the AD container, where the object is located, right-click the object and select Properties.
  1. Then, click the Object tab – the Canonical Name is displayed on this tab.

Option 2: View Canonical Name with PowerShell

  1. Open PowerShell on a computer that has access to a Domain Controller.
  2. Then, get the object’s distinguishedName by running the command below. The command saves the result in the $distinguishedName variable.
$distinguishedName = (Get-ADObject -Filter {Name -eq 'Anthony Raj'}).DistinguishedName
In the above command, ‘Anthony Raj’ is the AD Display Name of the object I want to get its CN. Here is the result of the command. To confirm that it worked, I executed the variable.
Then, get the object's distinguishedName by running the command below. The command saves the result in the $distinguishedName variable.
  1. Finally, display the objects Canonical Name by running this command:
Get-ADObject -filter {distinguishedname -eq $distinguishedName} -properties canonicalName

The command displayed other properties. To display just the CN, modify the command as shown below.

(Get-ADObject -filter {distinguishedname -eq $distinguishedName} -properties canonicalName).CanonicalName

Conclusion

An AD object’s canonicalName displays the object in the canonical format. This shows the full path of the object in AD, separated by a forward slash (/).

If you need to view this property in Active Directory, you can use ADUC or PowerShell as I have shown in this quick guide.

If this guide met your expectations, let me know by responding Yes to the “Was this page helpful?” below. Before you go, browse our Windows Server How-to Guides for more guides.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend