title: LDAP query for all users in sub OUs within a particular OU
body: <p>The active directory I have to deal with is laid out as such: the domain contains many OUs. One of these OUs is named "Primary OU". Within this OU are several OUs named with location of global offices (ie "Chicago" "Paris"). </p>
  
  <p>Any user account that is an actual flesh and bone person is put into the OU named for the office they work in as their primary OU. Any user account that is an alias, generic account, or otherwise not directly tied to a real person, has the "Primary OU" OU set as their primary OU.</p>
  
  <p>Data-wise, this primary OU distinction is the only thing that indicates which users are real people, and which users are not. There is no group that contains only real people, no indicator in any field that they are real people or not, and making any changes to active directory or any user accounts is strictly forbidden.</p>
  
  <p>My task is writing a query that will only get all actual flesh and bone people.</p>
  
  <p>Unfortunately LDAP is not exactly my strong suit and the only way I've come up with is searching each of these office sub OUs individually and putting all the results together, but there are a lot of offices and it would require a change to the query if any offices were added, which I need to avoid.</p>
  
  <p>Is there a way to query all users within a particular OU's "sub" OUs, but not return any users directly in the parent OU?</p>