Landpy.ActiveDirectory 1.0.0

Operate the Active Directory object with Active Record pattern, forget hundreds of the AD attribute names and AD attribute const values, forget all the details of the Active Directory and enjoy your self.
And you can also use the code to generate the filter to get the AD object search result, all the code is clear and simple.

There is a newer version of this package available.
See the version list below for details.
Install-Package Landpy.ActiveDirectory -Version 1.0.0
dotnet add package Landpy.ActiveDirectory --version 1.0.0
<PackageReference Include="Landpy.ActiveDirectory" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Landpy.ActiveDirectory --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Landpy.ActiveDirectory, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Landpy.ActiveDirectory as a Cake Addin
#addin nuget:?package=Landpy.ActiveDirectory&version=1.0.0

// Install Landpy.ActiveDirectory as a Cake Tool
#tool nuget:?package=Landpy.ActiveDirectory&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Landpy Active Directory Library with Active Record pattern!

Eg: Update a user AD object.
using (var userObject = UserObject.FindOneByCN(this.ADOperator, “pangxiaoliang”))
{
    if(userObject.Email == "example@landpy.com")
    {
         userObject.Email = "mv@live.cn";
         userObject.Save();
    }
}


Eg: Query user AD objects.
// 1. CN end with "liu", Mail conatains "live" (Eg: mv@live.cn), job title is "Dev" and AD object type is user.
// 2. CN start with "pang", Mail conatains "live" (Eg: mv@live.cn), job title is "Dev" and AD object type is user.
           IFilter filter =
               new And(
                   new IsUser(),
                   new Contains(PersonAttributeNames.Mail, "live"),
                   new Is(PersonAttributeNames.Title, "Dev"),
                   new Or(
                           new StartWith(AttributeNames.CN, "pang"),
                           new EndWith(AttributeNames.CN, "liu")
                       )
                   );
// Output the user object display name.
foreach (var userObject in UserObject.FindAll(this.ADOperator, filter))
{
   using (userObject)
   {
       Console.WriteLine(userObject.DisplayName);
   }
}


Eg: Custom query.
IFilter filter =
   new And(
       new IsUser(),
       new Custom("(!userAccountControl:1.2.840.113556.1.4.803:=2)")
       );
// Output the user object display name.
foreach (var userObject in UserObject.FindAll(this.ADOperator, filter))
{
   using (userObject)
   {
       Console.WriteLine(userObject.DisplayName);
   }
}


Note: For more information and the getting start please visit the link https://landpyactivedirectory.codeplex.com/documentation

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0.6 15,617 9/2/2016
1.0.0.5 683 6/14/2016
1.0.0.4 3,448 12/13/2014
1.0.0.3 1,152 11/26/2013
1.0.0.2 693 11/20/2013
1.0.0.1 683 11/5/2013
1.0.0 724 11/5/2013
Show less