Set oContainer=GetObject(LDAPprefix & LDAPsuffix)
' Running the ModifyUsers Subroutine on the container
ModifyUsers(oContainer)
' Clean up
Set oContainer = Nothing
' Display a message box upon operation complete
MsgBox "Finished :O)"
' Close
WScript.Quit
Sub ModifyUsers(oTopLevelContainer) ' oTopLevelContainer is the oContainer object
Dim oObj
' Go into a loop for every object in the container
For Each oObj in oTopLevelContainer
' We use "Select Case" to apply different code/actions to different values of an item. In
' this case, we check every object's Class to apply the actions according to the Object's
' class, e.g. If it's a user object, it goes into the 'Case "user"' section.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.