Dim de As New DirectoryEntry("LDAP://" & GroupDN) For Each user As String In CType(de.Properties("member"),IEnumerable) GroupCollection.Add(Username,Username) Next
我的问题是,当GroupDN(组的可分辨名称)是“CN = Domain Users,CN = Users,DC = Mydomain,DC = local”时,For … Each循环不执行,当我检查时手动使用属性语句,它的计数为零.这似乎适用于我的域中的每个其他组,但“域用户”组应该包含所有人,并且它似乎包含任何人.
我已经检查了,该组在我的Windows AD工具中正确列出了每个人.我有什么明显的遗漏吗?另外,是否有更好的方法来获得一个团体的所有成员?
The Domain Users group uses a
“computed” mechanism based on the
“primary group ID” of the user to
determine membership and does not
typically store members as
multi-valued linked attributes. If the
primary group of the user is changed,
their membership in the Domain Users
group is written to the linked
attribute for the group and is no
longer calculated. This was true for
Windows 2000 and has not changed for
Windows Server 2003.
原文地址:https://www.jb51.cc/vb/255472.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。