This DLL can be used in any .NET application (winform, webform, WPF, etc.). You can easily get information from Active Directory about users, groups, organization units or you can create new users as well.

There are 5 sealed classes in this DLL, with the following methods:

  • SecurityGroup
    • ListADUsersInGroup()
    • GetUsersInGroup() – Fullname property will be available after calling this method
    • GetGroupsForUsername()
  • OrganizationUnit
    • ListADUsersInOU()
    • ListADUsersWithMail()
    • GetOUlist()
  • Domain
    • ListAllDepartments()
    • ListAllDivisions()
    • ListAllCompanies()
    • ListAllTitles()
    • DomainDistinguishedName()
    • UserExists()
  • UserInformation
    • UsernamePasswordMatch()
    • UserCanUseSSO()
    • UserEnabled()
    • GetEmailForUser()
    • GetUsernameForUser()
    • GetDivisionForUser()
  • UserManagement
    • CreateNewUser()
    • SetRandomPasswordAndChangeNextLogon()
    • EnableDisableUseraccount()
    • SetManager()
    • SetDepartment()
    • SetTitle()

It may happen in your network, that some of the methods above will only work if you give the domain admin username and the password in SecureString format. You’ll see that the affected methods have this comment in their summary field.

You can download the zip file from here:  Active Directory Managing Utility (420 downloads)