Extract Users from Distribution Group

I needed to extract a fair amount of users from a Distribution Group on a Windows SBS 2003 Server.  As the Server didn’t have PowerShell installed, I used this instead.

Set objGroup = GetObject _
("LDAP://cn=Group,ou=Distribution Groups,ou=MyBusiness,dc=domain,dc=local")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member")

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.