.Net Active Directory Wrapper Plus
.Net Active Directory Wrapper Plus is a packaged Visual Studio solution that includes a wrapper class that facilitates access and control of Active Directory functions from VB.Net or C# code. It includes a sample Windows application to demonstrate how to use the different functions and features in the class.
The Plus version features a more robust class structure, 16 more Active Directory functions and a richer Windows sample application that demonstrates the use of threading when using those functions to improve efficiency and application response time.
-> Click here to see a Flash Demo of the various features.
Feature List Comparison
Click on the feature you would like to learn about.
Authentication to AD
This feature allows you to authenticate against ad. This is done by passing in a username and a password.
Member of
LDAPManager Class
Function
public bool Login( string username, string password)
Screenshot

Creating user
This feature allows you to create a new LDAP user.
Member of
LDAPManager Class
Function
public LdapUser CreateUser( string username,
string firstname,
string initial,
string lastname,
string fullname,
string password)
Screenshot
Deleting user
This feature will allow you to delete a user
Member of
LDAPUser Class
Function
public void Delete()
Change user password
Allows you to change the users password.
Member of
LDAPUser Class
Function
public void SetPassword( string password)
Snapshot
Check if user exists
Returns a true or false whether the passed username exists in AD or not.
Member of
LDAPManager Class
Function
public bool UserExists( string username)
Snapshot
Check if user belongs to an Active Directory Group
Checks to see if the given user belongs to a specific AD group
Member of
LDAPGroup
Function
IsUserInGroup(LDAPuser user)
Enable User
Enables the user
Member of
LDAPUser Class
Function
public void Enable()
Disable User
Disables the user
Member of
LDAPUser Class
Function
public void Disable()
Add user to group
Adds a user to a group
Member of
LDAPUser Class
Function
public void AddGroup(LdapGroup group)
Snapshot
Listing all AD groups
Returns a collection of all existing groups in Active Directory
Member of
LDAPManager Class
Function
public LdapGroupCollection GetGroups()
Listing all AD users
Returns a collection of all existing Active Directory users
Member of
LDAPManager Class
Function
public LdapUserCollection GetUsers()
Screenshot

Creating a new group
Creates a new Active Directory group
Member of
LDAPManager Class
Function
public LdapGroup CreateGroup( string group, string description)
Screenshot
Deleting a group
Deletes a group from Active Directory
Member of
LDAPGroup Class
Function
public void Delete()
Remove a user from group
Removes the user from a given Active Directory group
Member of
LDAPGroup Class
Function
public LdapGroup RemoveUser(LdapUser user)
Display all user properties
All Active Directory object contain a collection of properties
Member of
LDAPUser Class
Property
public Hashtable Properties
Update user properties
All objects in Active Directory could be saved after being changed.
Member of
LDAPUser Class
Function
public virtual void Save()
Screenshot
Searching users by username
Returns a collection of all users that contain the given string in their username
Member of
LDAPManager Class
Function
public LdapUserCollection GetUsers(UserProperty.Username,
string propertyValue)
Searching users by email
Returns a collection of all users that contain have the given email in their property collection
Member of
LDAPManager Class
Function
public LdapUserCollection GetUsers(UserProperty.Email,
string propertyValue)
Searching users using masks
Including the '*' in searching of username adds powerful features to the search
Search String |
Description |
sam |
Will return users with username equal to sam |
*sam |
Will return users with usernames that end in Sam |
sam* |
Will return users with usernames that start with sam |
*sam* |
Will return users with usernames that contain the word sam |
Screenshot

Searching groups
Returns a collection of AD groups with the specified string.
Searching groups using masks
Member of
LDAPManager Class
Including the '*' in searching of groups adds features to the search:
Search String |
Description |
admin |
Will return groups with name equal to 'admin' |
*admin |
Will return groups with name that end in 'admin' |
admin* |
Will return groups with names that start with 'admin' |
*admin* |
Will return groups with names that contain the word 'admin' |
Screenshot
Quick object property lookup
Returns the value of the specified property for a given user object
Member of
LDAPUser Class
Screenshot
Uses strongly typed object (User and Group)
LDAPManager Class
The LDAP Manager class contains methods that are not necessarily associated to an object. Examples are creating groups, getting a complete list of users from AD. The properties and methods used in the LDAPManager Class are shown below. The LDAPManager class is a sealed class and cannot be instantiated.
The LDAPManager Class is the class that is used to connect to Active Directory. This is done by providing the class with the:
Domain:
Username:
Password:
Path:
Server:
And then calling the Login Method

The ADObject Class
The ADObject class is the base class for the LDAPGroup and LDAPUser classes.

LDAPGroup Class
The LDAPGroup Class represents an LDAP Group object.
The following are members of the LDAPGroup Class:
Member |
Description |
Description |
Description of the object |
GroupName |
The name of the LDAP group object |
AddUser() |
Adds a user to the group |
GetUsers() |
Returns the users that belong to that group |
RemoveUser() |
Removes a user from the group |
Save() |
Saves the information in the object to the LDAP store |
Delete() |
Deletes the object from the LDAP store |
LDAPUser Class
Member |
Description |
Disabled |
Holds a boolean of whether the user is enabled or disabled |
DistinguishedName |
|
FirstName |
|
Lastname |
|
Username |
|
AddGroup |
Adds the user to a group |
Disable |
Disables the user |
Enable |
Enables the user |
IsInGroup |
Returns a Boolean whether the user is in a given group |
RemoveGroup |
Removes the user from a given group |
SetPassword |
Resets the password of the user to a new password |
|