Solved

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

Posted on 2009-05-19
1
978 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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now