473,805 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retrieving Users and Groups from AD in chunks??

Here is my problem and I hope there is someone out-there who can help
me.

I want to search my domain for all users and groups. And since there
are lot of them I want to read them back in chunks of 50, how do I do
that?

I have tried to use the property SizeLimit of the Directory searcher
and yea I only get 50 objects back but how the h-ll do I get the next
chunk of 50 objects back? Can I somehow specify a range similar to the
range that is used to retrive chunks of attributes?

Hope I made some sense atleast because I'm a bit cunfused hera about
what is used for different things in the direcory searcher and the
documentation is quite poor.

I'm starting to get desperate here!

Johan
Nov 20 '05 #1
1 1031
You can't. You need to use Paged searches (0 < PageSize <= max page size,
normally 1000) , but you can't retrieve the pages explicitly. That is all
done for you as you enumerate the results.

You could enumerate the results 50 at a time, but you need to enumerate the
whole result set from one search.

Joe K.

"Johan" <c_************ *@hotmail.com> wrote in message
news:d2******** *************** ***@posting.goo gle.com...
Here is my problem and I hope there is someone out-there who can help
me.

I want to search my domain for all users and groups. And since there
are lot of them I want to read them back in chunks of 50, how do I do
that?

I have tried to use the property SizeLimit of the Directory searcher
and yea I only get 50 objects back but how the h-ll do I get the next
chunk of 50 objects back? Can I somehow specify a range similar to the
range that is used to retrive chunks of attributes?

Hope I made some sense atleast because I'm a bit cunfused hera about
what is used for different things in the direcory searcher and the
documentation is quite poor.

I'm starting to get desperate here!

Johan

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
5409
by: Don | last post by:
How do I retrieve the full path (C:\.....filename) of a file uploaded to a php script on the server. I think $_FILES will only provide 'name', which is only the filename itself. Thanks, Don ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
0
1587
by: Alistair | last post by:
Hi all, I am creating a database based site that keeps track of books, who has read them and the comments they have. After a little help in M.P.I.asp.DB I managed to create a database (access 2000) as follows USERS TABLE
0
1532
by: James | last post by:
Hello All, I am working in a Windows NT domain environment, working with C#. What I want to be able to do is view all the groups a user belongs to, and also be able to add the users to groups. I want to be able to enter a user name and then get it to diaplay all the groups this user belongs to. Are the groups a user belongs to stored as child entries under the user, or are users child entries under groups, or am I way off track.
0
1818
by: Neo | last post by:
Hi Everyone I am trying to set and retrieve NTFS permssions for fileshares on remote machine using ActiveDs Interop. It works for domain groups and users but when try to retrieve permssions for local groups and users it gives me dangling SIDs. While setting permssions how can I indicate whether the user or group is local or a domain group ?. Following is the code snippet I am using for retrieving permissions
0
979
by: Jason | last post by:
I am working on an ASP.Net application that retrieves various information about groups and users from AD and then I would like to look at the security information on some folder, on our server. I am able to get a list of the folders (using impersonation), but I can not retrieve a list of the groups/users that have access to them. I have tried to run the CACLS tool to get the list into a file, but I get an "unknown account or bad...
1
3899
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry = New DirectoryEntry("LDAP://domain") Dim mySearcher As New DirectorySearcher(enTry) Dim resEnt As SearchResult mySearcher.Filter = ("(objectClass=*)") mySearcher.SearchScope = SearchScope.Subtree
1
2252
by: Glenn T. Kitchen | last post by:
Dear Group, I'm having problems retrieving the child rows of a parent row. The parent table is Users and the child table is Addresses. I used the Schema to create a DataRelation between the Primary Key of the parent table and a Long Integer field of the child table. I allowed default (which defaults to Cascade) in the relationship. The relationship is titled "drlnUserAddress". I always get a return of 0 child rows and there are four...
3
2195
by: =?Utf-8?B?YW1pcg==?= | last post by:
Hi, I have a Generic Object that has a private List field item. I populate the List in a different function I use a FOREACH LOOP with a FindAll function to get all items that have a certain match for data in the list and do something to it. The problem is that it repeats for all data items in the list and not
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10613
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10107
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3846
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.