Returns the members of an Active Directory group

'Returns the members of an Active Directory group name Testgroup

On Error Resume Next
Set objGroup = GetObject("LDAP://cn=Testgroup,dc=Home,dc=com")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member")

WScript.Echo "Members:"
For Each strMember in arrMemberOf
    WScript.echo strMember
Next

' End of Script

***Share your comments about the post***

1 comment:

  1. Hello, can you post the script for finding members in a group by NOT specifying the group DN ?
    Powershell script gives that info., but limited to 5000.

    ReplyDelete