[英]Get memberOf data for a group?
In AD how can I find what groups a group belongs to? 在AD中,如何找到组所属的组? I know that for users I can do this:
我知道对于用户我可以这样做:
directoryEntry.Invoke("Groups");
But that doesn't work on a group. 但这不适用于一个小组。
Thnaks Thnaks
Try the following: 请尝试以下操作:
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "ADDomain", "ADContainer");
GroupPrincipal grp = GroupPrincipal.FindByIdentity(ctx, "groupName");
PrincipalSearchResult<Principal> groups = grp.GetGroups();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.