473,498 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADSI/LDAP Query

Arianne, I have the following code in C Sharp which query
the Active Directory to get the user details. But it
brings up only 1000 records.
Is there any code which can give me all the records from
Active Directory.
I have the folowing code in c sharp. But it returns only
1000 records. Is there a way to get all teh records from
Active Directory.

DirectoryEntry de = new DirectoryEntry
("LDAP://OU=StoreUsers,DC=test,DC=test,DC=test,DC=net");
DirectorySearcher src = new DirectorySearcher(de);
src.SearchRoot = de;

foreach(SearchResult res in src.FindAll())
{
while(ien.MoveNext())
{
Console.WriteLine (ien.Key.ToString());
Console.WriteLine (res.Properties
[ien.Key.ToString()][0]);
}
}
Nov 17 '05 #1
0 3171

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

Similar topics

2
14814
by: vorpal | last post by:
Hi, I have successfully set and used a linked server to query ADSI. Since this question also concerns MSSQLServer, I've cross posted it -- I hope this is not a breach of etiquette. I have...
5
2631
by: Rubble | last post by:
Hello, Im trying to see if a user exists in active directory. The code I have has been posted elsewhere and apparantly works for others....but it will not work for me. I get the error: "The...
10
6893
by: Victor Pereira | last post by:
Hi, I'm trying to rename the Administrator Login, and i want to know if my approach is right: void RenameUsr(string hostname, string admusr) { DirectoryEntry entry = new...
1
2761
by: James Schuler | last post by:
I am trying to run a query in an ASP.NET application against Active Directory using a linked server (ADSI) in SQL Server 2000. The query runs without any problems in Query Analyzer: SELECT...
0
921
by: Tim::.. | last post by:
Hi, Can someone please tell me how I can combine the function and the sub below to create a cleaner bit of code! I want to loop through the ActiveDirectory and return users information in a...
14
5637
by: Jonathan Smith | last post by:
I am trying to develop an app using ADSI. I have the following code: Dim ADSUser As IADsUser ADSUser = GetObject("LDAP://CN=jonsmith,CN=users,DC=domain,DC=com") ...
0
975
by: Jordy | last post by:
I am trying Write an ADSI query that returns the Users in the Active Directory, but in the results Concatenate the SN and givenName fields... Any tips... ...
3
2215
by: chat_devil | last post by:
hi, does anyone know if it is possible to remove an attribute that can not be read into the ADSI property cache/collection. i'm trying to do an eDirectory password change from .net directory...
1
3132
by: zmunoz | last post by:
I am working on a script using ADSI via COM in PHP. The script works for the most part when I query a user using the following function: function passwordExpires($userDN) { $comLDAP = new...
8
3104
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6993
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...
0
7162
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,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5456
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,...
1
4899
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...
0
3088
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...
0
1411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.