I would like to get all members (mail address) of a certain distribution list.
Currently I just recieve the first 1500 members. My Script looks like that:
When retrieving a large attribute you need to ask for the values in it in batches. This is often called "ranged retrieval" in directory speak.
Nearly every well behaving MSFT LDAP API supports this, including ADSI...
http://msdn.microsoft.com/en-us/library/windows/desktop/ms676302(v=vs.85).aspx