Landpy.ActiveDirectory
1.0.0
See the version list below for details.
dotnet add package Landpy.ActiveDirectory --version 1.0.0
NuGet\Install-Package Landpy.ActiveDirectory -Version 1.0.0
<PackageReference Include="Landpy.ActiveDirectory" Version="1.0.0" />
paket add Landpy.ActiveDirectory --version 1.0.0
#r "nuget: Landpy.ActiveDirectory, 1.0.0"
// 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
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 | net20 is compatible. net35 was computed. net40 was computed. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
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