Solved

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

Posted on 2009-05-19
1
982 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
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

825 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