I need to be able to determine the distinguished name for an Active Directory Organizational Unit (OU) using C#. Once I have it I will then be able to insert it into the below statement which is part of a program to get all groups under an OU. Can someone please provide the code to identify the distinguished name or point to a published solution? Thanks.
PrincipalContext PCTX = new PrincipalContext(ContextType.Domain, DomainName, OUDistingushedName);
Thanks in advance.