Retreiving Organization Unit Object From Active Directory using C# or VB .Net
The method retrieves an updatable Organization Unit object.
ASP.NET, C#, VB.Net, Visual Studio 2010, Visual Sutdio 2012
Parameters: (string) Organization Unit Name
An instance of the LDAP manager must be instantiated for a valid ADDS server
and logged in.
The method is called passing the Organization Unit as a string. Three
things can then occur:
- If the Organization Unit exists and the method returns an LdapOU
- If the Organization Unit does not exist the method return a null object
- An Exception will be thrown for other errors
Where LdapConnection is an instance of LdapManager
public LdapOU GetOrgUnit(String ouName)
The retrieved object has two methods GetOUs and GetUsers