Is there an ADSI Library out there for .NET/C#? I have been able to find bits and pieces of code to do some tasks but nothing comprehensive.
I’m looking for a library that I can just drop into my code and run without having to do too much customization? I’m thinking something along the lines of MEMM for Excel
Thanks.
For .NET 1.x, there’s really only the
System.DirectoryServicesnamespace – not much more, unfortunately. That’s your basicDirectoryEntryandDirectorySearcherclasses, and that’s about it…...NET 2.0 added the
S.DS.ActiveDirectorynamespace to handle structural objects like forests, domains, and so forth a lot easier. Check out this MSDN article New Ways to Manage Active Directory using the .NET Framework 2.0 on how to leverage those new capabilities.For .NET 3.5 and up, there’s a new
S.DS.AccountManagementnamespace which makes working with principals (users, groups, computers) a lot easier. Again, for an excellent intro, read this MSDN article Managing Directory Security Principals in the .NET Framework 3.5.Hope that helps a bit!
Marc