Solved

Active Directory and VB.Net - populating a dropdown list with specific OU's from a domain?

Posted on 2009-05-19
1
991 Views
Last Modified: 2013-11-26
I need to populate a dropdownlist with all OU's in a specific domain.  Then when a user selects the OU, it will display another dropdownlist with the groups from that OU.  The user then can add or remove users from the selected group/groups.  Any code examples or pont me to the right direction where and how I can do this using VS 2008 as a web form?
0
Comment
Question by:kouts1
[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
1 Comment
 
LVL 23

Accepted Solution

by:
debuggerau earned 500 total points
ID: 24428191
this should get you started, however VS2008 questions are better in the appropriate section.
create a file like ListOUs.vbs and insert the following code:

Set objOU = GetObject("LDAP://ou=<Your OU Group>,dc=<your domain>,dc=com")
objOU.Filter = Array("organizationalUnit")
strList = "Select an Organizational Unit:"
For Each objChild In objOU
    strList = strList & vbCrLf & objChild.ou
Next
strSelect = InputBox(strList, "MyProgram")
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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 …

735 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