?
Solved

Listing all of the System.DirectoryServices.DirectoryEntry objects properties

Posted on 2004-09-17
2
Medium Priority
?
553 Views
Last Modified: 2008-02-01
Hi,
I'm wondering how to list every single property in a textbox of System.DirectoryServices.DirectoryEntry.Properties. The list only takes a name of a property and further I'm not entirely sure what the property contains. Another list? Thanks for any help.
0
Comment
Question by:xersoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
mpemberton5 earned 200 total points
ID: 12102004
Are you looking for something like this?

        Dim ldapCommand As String
        ldapCommand = "LDAP://ad/OU=testorg,OU=clients,DC=yourdomain,DC=com"
        Dim de As DirectoryEntry = New DirectoryEntry(ldapCommand)
        Dim obEntry As DirectoryEntry = New DirectoryEntry(ldapCommand)
        Dim srch As DirectorySearcher = New DirectorySearcher(obEntry, "(&(objectClass=user)(samAccountName=" & AccountName & "))")
        Dim rescol As SearchResultCollection = srch.FindAll
        Dim res As SearchResult
        For Each res In rescol

            Dim item As String
            For Each item In res.Properties.PropertyNames
                Response.Write(item.ToString & " - ")
                Response.Write(res.Properties(item.ToString)(0).ToString)
                Response.Write("<BR>")
            Next
            Response.Write("<BR>")
        '''Next
0
 
LVL 5

Author Comment

by:xersoft
ID: 12102137
Properties.PropertyNames ahh I see, don't know why I didn't see that before. But this is perfect. I can look at each property name. Thanks for the help!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question