yellowartist
IS-IT--Management
What I am trying to occomplish is I have a script that generagtes a list of users that are tied to a specific global group. From that list I want to go through all the users and remove them from any Distribution Lists.
The group type is always Distributions list or 8
The Group Scope is universal on our Distribution lists.
I do not want to remove all the groups just the distribution lists.
I have tried this:
This of course did not work.
Strdn = the distinguished name of the users.
I am guessing it has something to do with not binding to the group... It is making it through to the WScript.Echo
The group type is always Distributions list or 8
The Group Scope is universal on our Distribution lists.
I do not want to remove all the groups just the distribution lists.
I have tried this:
Code:
Set objUser = GetObject("LDAP://"& strdn)
objGroup.Remove "groupType", ADS_GROUP_TYPE_UNIVERSAL_GROUP
Wscript.Echo "Removed" & Strcn & "From DL's"
This of course did not work.
Code:
set objUser = GetObject ("LDAP://" & strdn)
Strdn = the distinguished name of the users.
I am guessing it has something to do with not binding to the group... It is making it through to the WScript.Echo