Landpy.ActiveDirectory
1.0.0.6
dotnet add package Landpy.ActiveDirectory --version 1.0.0.6
NuGet\Install-Package Landpy.ActiveDirectory -Version 1.0.0.6
<PackageReference Include="Landpy.ActiveDirectory" Version="1.0.0.6" />
paket add Landpy.ActiveDirectory --version 1.0.0.6
#r "nuget: Landpy.ActiveDirectory, 1.0.0.6"
// Install Landpy.ActiveDirectory as a Cake Addin #addin nuget:?package=Landpy.ActiveDirectory&version=1.0.0.6 // Install Landpy.ActiveDirectory as a Cake Tool #tool nuget:?package=Landpy.ActiveDirectory&version=1.0.0.6
http://fewbox.com/
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
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.
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