Marty wrote:
> I am trying to find a way to export the members of a group
> into a text file. The text file should only contain the
> usernames, not the display or anything else.
This will give you DN of each group member
===
strGroupDN = "CN=Group,OU=GroupOU,DC=domain,DC=local"
Set objGroup = GetObject("LDAP://" & strGroupDN)
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next
Set objGroup = Nothing
===
if you want to get their samAccount name You can also do this with a script
==
Set objUser = GetObject("LDAP://" & strMember )
Wscript echo objUser.Get("samAccountName")
Set objGroup = Nothing
==
In such way You can get value all of user's attribute
--
Tomasz Onyszko [MVP]
T.Onyszko.RemoveThis@w2k.pl
<a style='text-decoration: underline;' href="http://www.w2k.pl" target="_blank">http://www.w2k.pl</a><!-- ~MESSAGE_AFTER~ -->