Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function IsMember(ByVal objADObject, ByVal strGroup)
- ' Function to test for group membership.
- ' objGroupList is a dictionary object with global scope.
- ' "Everyone" is a pseudo-group that should always return True
- If (LCase(strGroup) = "everyone") Then
- IsMember = True
- Else ' Otherwise do a proper check
- If (IsEmpty(objGroupList) = True) Then
- Set objGroupList = CreateObject("Scripting.Dictionary")
- End If
- If (objGroupList.Exists(objADObject.sAMAccountName & "\") = False) Then
- Call LoadGroups(objADObject, objADObject)
- objGroupList.Add objADObject.sAMAccountName & "\", True
- End If
- IsMember = objGroupList.Exists(objADObject.sAMAccountName & "\" _
- & strGroup)
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement