I've an Active Directory with domain myDomain.local
, under it there exists a Distribution Group
that contains many groups.
How can I read (programmatically) all these subgroups to retrieve a list of their names ?
And how to optimize the query to filter the result so that it just retrieves all the groups that ends with the word Region
?
BTW, I'm using C#.Net, ASP.Net and sharepoint, and i'm not experienced with AD.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
If you're on .NET 3.5 (or can upgrade to it), you can use this code using the
System.DirectoryServices.AccountManagement
namespace:Does that satisfy your needs?
For more info on the
System.DirectoryServices.AccountManagement
namespace, read the Managing Directory Security Principals in the .NET Framework 3.5 article in MSDN magazine.Here's the solution I made; for those who are interested: