Limited to copying 1500 users from one group to another.

Discussion in 'Scripting' started by tk, Jul 24, 2007.

  1. tk

    tk Guest

    I have a script that copies users from one group to another and it works
    fine, except that it will only copy 1500 users. The group that I am copying
    from actually has over 5000 users. Here is the script -

    Set objOU = GetObject("LDAP://OU=X")
    Set objOldGroup = GetObject("LDAP://CN=X")

    Set objnewGroup = GetObject("LDAP://CN=X")

    For Each objUser in objOldGroup.Member
    objNewGroup.Add "LDAP://" & objUser
    Next

    Any ideas on what might be happening?

    Thanks,
    Tom
     
    tk, Jul 24, 2007
    #1
    1. Advertisements

  2. tk

    Wayne Tilton Guest

    You need to use ranging when manipulating groups with >1500 members (~900
    in Win2k AD). MS has pointers on how to do that, including this one:

    http://msdn2.microsoft.com/en-us/library/aa705933.aspx

    HTH,

    Wayne Tilton
     
    Wayne Tilton, Jul 24, 2007
    #2
    1. Advertisements

  3. tk

    tk Guest


    Thanks for the link.

    Tom
     
    tk, Jul 25, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.