{"id":2420,"date":"2014-04-28T08:00:35","date_gmt":"2014-04-28T06:00:35","guid":{"rendered":"http:\/\/www.razumny.no\/?p=2420"},"modified":"2014-03-10T10:21:20","modified_gmt":"2014-03-10T09:21:20","slug":"understanding-active-directory-distinguished-names","status":"publish","type":"post","link":"https:\/\/www.razumny.no\/?p=2420","title":{"rendered":"Understanding Active Directory Distinguished Names"},"content":{"rendered":"<p>In Active Directory, and I assume any system using LDAP, a Distinguished Name (DN) is a way to identify a given user with confidence. It is a string of Relative Distinguished Names, separated by commas. There are a number of different RDNs in existense, but for our purposes, these are the ones we might need:<\/p>\n<table border=\"1\" bordercolor=\"#000000\" style=\"background-color:#FFFFFF\" width=\"100%\" cellpadding=\"3\" cellspacing=\"3\">\n<tr>\n<td>String<\/td>\n<td>Attribute type<\/td>\n<\/tr>\n<tr>\n<td>DC<\/td>\n<td>domainComponent<\/td>\n<\/tr>\n<tr>\n<td>CN<\/td>\n<td>commonName<\/td>\n<\/tr>\n<tr>\n<td>OU<\/td>\n<td>organisationalUnitName<\/td>\n<\/tr>\n<tr>\n<td>O<\/td>\n<td>organisationName<\/td>\n<\/tr>\n<\/table>\n<p>A DN, then, comprises information about where in the Active Directory hierarchy we can find a given user&#8217;s account. If a user account name is JDOE and is located at Domain.com\\Users\\Superusers, the DN becomes <code>CN=JDOE,OU=Superusers,OU=Users,DC=Domain,DC=com<\/CODE>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Active Directory, and I assume any system using LDAP, a Distinguished Name (DN) is a way to identify a given user with confidence. It is a string of Relative Distinguished Names, separated by commas. There are a number of different RDNs in existense, but for our purposes, these are the ones we might need: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[615],"tags":[],"class_list":["post-2420","post","type-post","status-publish","format-standard","hentry","category-how-to-2"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2ukSU-D2","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2419,"url":"https:\/\/www.razumny.no\/?p=2419","url_meta":{"origin":2420,"position":0},"title":"Exporting a list of a given users group memberships from Active Directory","author":"Aleksander Nordgarden-R\u00f8dner","date":"05\/05\/2014","format":false,"excerpt":"A while back, I showed you how to export a list of all members of a group, as well as all computers, from Active Directory. On a related note, here's how to export all group memberships held by a single user: Log on to your Domain Controller Open a command\u2026","rel":"","context":"In &quot;code examples&quot;","block_context":{"text":"code examples","link":"https:\/\/www.razumny.no\/?cat=119"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6301,"url":"https:\/\/www.razumny.no\/?p=6301","url_meta":{"origin":2420,"position":1},"title":"Finding the full OU path of an AD OU","author":"Aleksander Nordgarden-R\u00f8dner","date":"22\/02\/2021","format":false,"excerpt":"Using PowerShell, I was building a script to identify a subset of the groups in a given organizational unit (OU). As you may know, these are built up of subsections with the prefixes CN (common name) and DC (Domain Component). In order to have the script run successfully, you need\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5265,"url":"https:\/\/www.razumny.no\/?p=5265","url_meta":{"origin":2420,"position":2},"title":"Building a script to find all members of a given group","author":"Aleksander Nordgarden-R\u00f8dner","date":"09\/09\/2019","format":false,"excerpt":"Some time ago, I was asked to provide a list of everyone with access to a specific system. After communicating with the client, it transpired that they were particularly interested in knowing who were the members of a set of Active Directory groups. While this can be done manually, I\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6996,"url":"https:\/\/www.razumny.no\/?p=6996","url_meta":{"origin":2420,"position":3},"title":"PowerShell: &#8220;Some or all identity references could not be translated&#8221;","author":"Aleksander Nordgarden-R\u00f8dner","date":"05\/12\/2022","format":false,"excerpt":"For a whole host of reasons we use scripts to create access controlled file shares, and to create the Active Directory groups that control access to them. Not only is it easier than doing it manually, it also ensures that the group is created in the correct place, that permissions\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/www.razumny.no\/?cat=820"},"img":{"alt_text":"Picture of text:\n\nRetry-Command: Some or all identity references could not be translated.\nAt C:\\Scripts\\Opprette-Styrtomr\u00e5de.ps1:113 char:1\n+ Retry-Command -ScriptBlock {\n+\n+ CategoryInfo\n+ FullyQualified Error Id: Microsoft.\n: NotSpecified: (:) [Write-Error], WriteError Exception\nPowerShell.Commands.WriteError Exception, Retry-Command","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-107.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-107.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-107.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5451,"url":"https:\/\/www.razumny.no\/?p=5451","url_meta":{"origin":2420,"position":4},"title":"PowerShell: Pipe output to CSV file","author":"Aleksander Nordgarden-R\u00f8dner","date":"11\/05\/2020","format":false,"excerpt":"Last week, I showed you how to get specific properties for all users in a given OU. Knowing that the output of that query quickly gets hard to navigate, wanting to remove the extraneous data that the customer didn't request, and assuming that they wanted to manipulate the data, I\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/www.razumny.no\/?cat=820"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6303,"url":"https:\/\/www.razumny.no\/?p=6303","url_meta":{"origin":2420,"position":5},"title":"Finding all groups without a manager in a specific OU in AD","author":"Aleksander Nordgarden-R\u00f8dner","date":"01\/03\/2021","format":false,"excerpt":"Last week, I showed you how you can easily find the OU to use when looking for the members of a specific OU. Today, I'd like to show you how I use that information. The background was that we use AD groups to control access to network shares. In order\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-47.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/2420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2420"}],"version-history":[{"count":1,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/2420\/revisions"}],"predecessor-version":[{"id":2423,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/2420\/revisions\/2423"}],"wp:attachment":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}