objGroup.GetInfo arrMemberOf = objGroup.GetEx("member") For Each strMember in arrMemberOf
Set objUser = GetObject("LDAP://" & strMember)
objUser.GetInfo
WScript.Echo objUser.Displayname & "," & objUser.Department
Next
如果需要导出列表,在命令行下运行cscript listuser.vbs>user.txt即可。
本文出自 “IT界的许三多” 博客,请务必保留此出处http://tao61.blog.51cto.com/102239/318492