Using hideDLMemberships, how to hide group members via VBScript?

Using hideDLMemberships, how to hide group members via VBScript?

Post by gabor meste » Wed, 02 Jul 2003 08:41:07



I need to hide members of a distribution list so people cannot see who
belongs to which group.  Currently I can use the AD users and Computers GUI
you to run an Exchange Task on each group and select the 'Hide Membership'
task and this will successfully hide members of a group.  The downside to
this method is that you have to run this for each distrubution list group.
Using the GUI is not an option, I need to have a script do this since our
lists are destroyed and created everynight and it is simply not efficient to
hand do this everymorning on 200+ groups.

So far I am using the following code to Hide memberships without much
success.
----------------------------------------------------------------
ou.Filter = Array("group")
for each Group in ou
     ' Hide the group's memberships
     Group.Put "hideDLMembership", "TRUE"
    Group.SetInfo
next
----------------------------------------------------------------

After this code runs in ADSI Edit, if you look at the Exchange Task option
for a particular group, it will register that the group is now 'hidden' but
yet in the GAL, i can still see the members of this group!  How can this be?

Has anyone written a VBScript that uses this 'hideDLMembership' parameter to
successfully hide memebrships of a group?

thanks,

gabor