1
교장을 어떻게 받아 들여 그룹인지 확인하십시오. 또는 회원이 있습니까?AccountManagement가 Principal GroupPrincipal입니까?
using(var ctx = new PrincipalContext(ContextType.Domain, "some.domain.com", "DC=some,DC=domain,DC=com"))
{
var group = GroupPrincipal.FindByIdentity(ctx, IdentityType.DistinguishedName, "some long distinguishedname");
if(group != null)
{
var subgroups = group.GetMembers().Where(m => m.[IS A GROUP])
foreach (var principal in group.GetMembers())
{
Console.WriteLine(principal.DistinguishedName);
}
}
}
내가 생각 답변을 찾았습니다 : http://stackoverflow.com/questions/6354807/how-to-know-if-directoryentry-is-a-user-or-a-group –