Skip to main content

Build distinguished name

Turn a readable path such as Corp/Sales/EMEA and a domain into a distinguished name (OU=EMEA,OU=Sales,OU=Corp,DC=corp,DC=example,DC=com), optionally ending with a user, group or computer name.

Command in the Active Directory toolkit · id ooa.active_directory/build_dn · 5 inputs, 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
PathStringNoOrganizational units from the top down, separated by /; may start with the domain (corp.example.com/Corp/Sales).
DomainStringNoDNS name of the domain; taken from the start of path when empty.
NameStringNoName of the object at the end (its common name); the container's own name when empty.
Name kindStringNoCNCN for users, groups and computers; OU when name is an organizational unit.
Path kindStringNoautoauto makes path parts organizational units, except built-in containers such as Users or Computers at the top (CN=); ou or cn forces one kind.

Outputs​

OutputTypeWhat it is
dnStringThe distinguished name.
parent_dnStringThe distinguished name of the container (without the name).