Solved

Listing all of the System.DirectoryServices.DirectoryEntry objects properties

Posted on 2004-09-17
2
535 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 50 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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