本文介绍了枚举管理员组(AD)的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我找到了这个方便的脚本,我正在尝试将其转换为VB.NET。它会弹出Administrators / Builtin组中的成员列表。不能 似乎让DirectorySearcher或DirectoryEntry的工作类似于 这个。将其作为VBS脚本运行以查看: 选项显式 Dim strUser,strMember,strDNSDomain,strContainer Dim objGroup, objUser,objRootDSE Dim arrMemberOf ''绑定到Active Directory'' strContainer =" cn =管理员,cn =内置, 设置objRootDSE = GetObject(" LDAP:// RootDSE") strDNSDomain = objRootDSE.Get(" DefaultNamingContext") ''获取内置管理员组 设置objGroup = GetObject(" LDAP://"& strContainer& strDNSDomain) objGroup.getInfo arrMemberOf = objGroup.GetEx(" member") ''Loop = For Each .... Next WScript.EchoGroup of Members &安培; strContainer 每个strrmber在arrMemberOf WScript.echo strMember 下一页 Wscript.Quit 感谢您的帮助! 解决方案 Hi,I found this handy script and I''m trying to convert it to VB.NET. Itpops up a list of members in the Administrators/Builtin group. Can''tseem to get DirectorySearcher or DirectoryEntry working similar tothis. Run this as a VBS script to see:Option ExplicitDim strUser, strMember, strDNSDomain, strContainerDim objGroup, objUser, objRootDSEDim arrMemberOf'' Bind to Active Directory''strContainer = "cn=Administrators,cn=Builtin, "Set objRootDSE = GetObject("LDAP://RootDSE")strDNSDomain = objRootDSE.Get("DefaultNamingContext")'' Get the Builtin Administrators groupSet objGroup = GetObject ("LDAP://"& strContainer & strDNSDomain)objGroup.getInfoarrMemberOf = objGroup.GetEx("member")'' Loop = For Each .... NextWScript.Echo "Members of Group " & strContainerFor Each strMember in arrMemberOfWScript.echo strMemberNextWscript.QuitThanks for your help! 解决方案 这篇关于枚举管理员组(AD)的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-07 23:50