Const ADS_PROPERTY_CLEAR = 1
Set objGroup = GetObject("LDAP://cn=Finance Users,ou=Finance,dc=fabrikam,dc=com")
objGroup.PutEx ADS_PROPERTY_CLEAR, "member", 0
I use that to remove the users from a certain group.
I think a good solution for you would be to remove the members of ALL groups in a Certain OU, that would be much cleaner.
I actually found something that might work better, might want to run it in a test environment first, so you can learn what it's doing. Or someone else who's more versed can look it over to make sure it doesn't delete every user or group in your environment.
' Specify Distinguished Name of OU. All users in this OU
' that are members of the specified group will be removed.
strOU = "ou=Sales,ou=West,dc=MyDomain,dc=com"
' Bind to specified OU.
Set objOU = GetObject("LDAP://ou=Sales,ou=West,dc=MyDomain,dc=com")
' Filter on group objects.
objOU.Filter = Array("group")
' Enumerate all groups in the OU.
For Each objGroup In objOU
' Enumerate all direct members of the group.
For Each objMember In objGroup.Members
' Retrieve DN of parent container/OU of member.
Set objParent = GetObject(objMember.Parent)
strParentDN = objParent.distinguishedName
' Compare to specified OU.
If (LCase(strParentDN) = LCase(strOU)) Then
' Remove the member from the group.