Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Populate a Drop Down List with Group Members Exception.......

Posted on 2010-11-30
Medium Priority
Last Modified: 2012-05-10
I've done this in the past, and even got help with it here.  The difference, in this case, is that before the group name within the LDAP path was designated as OU=GroupName. The group I'm working with now is CN=GroupName.

It would follow that I could just change the existing code to CN=GroupName and that would fix it but the drop down list isn't populating. I'm hoping it's something trivial that I missed.

Public Sub FillDropdown()
        Dim ldapPath As String = "LDAP://CN=GroupName,DC=Departments,DC=ad,DC=domain,DC=com"
        Dim de As New DirectoryEntry(ldapPath)
        Dim ds As New DirectorySearcher(de)
        ds.PageSize = 1000
        ds.Filter = "(objectCategory=User)"

        Dim colUsers As ArrayList
        colUsers = New ArrayList
        Dim result As SearchResult

        For Each result In ds.FindAll()
        Next result
        DropDownList1.DataSource = colUsers
    End Sub

Open in new window

Question by:JB4375
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
LVL 83

Accepted Solution

CodeCruiser earned 2000 total points
ID: 34242907

Author Closing Comment

ID: 34282143
Thanks CC!!
LVL 83

Expert Comment

ID: 34282151
Glad to help :-)

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

610 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