How to filter specific OUS from Active Directory
<p>I'm trying to get a list of users from specific OU's.</p>

<p>The root is <code>COMPANY</code> then <code>USERS</code>, and then there are several OU's after that, say 10. I want to only grab the users from 5 out of the 10 OU's.</p>

<p>How can I accomplish this?</p>

<pre><code>  Dim ou As String = "OU=dept1,OU=Users,OU=COMPANY,DC=COMPANY,DC=local"
</code></pre>

<p>I want to add dept2 to 5 in that string. It doesn't work. I can only do 1 OU at a time. How can I filter 5 dept out of 10 under the OU users? </p>