title: get computer name from active directory and OU's
body: <p>i have a code to get all the computer names present in a doain which are not a part of any OU.</p>
  
  <pre><code>DirectoryEntry entry = new DirectoryEntry("LDAP://" + "Domain Name");
          DirectorySearcher mySearcher = new DirectorySearcher(entry);
          mySearcher.Filter = ("(objectClass=computer)");
          mySearcher.SizeLimit = int.MaxValue;
          mySearcher.PageSize = int.MaxValue;
  
          foreach (SearchResult resEnt in mySearcher.FindAll())
          {
              //"CN=SGSVG007DC"
              string ComputerName = resEnt.GetDirectoryEntry().Name;
              if (ComputerName.StartsWith("CN="))
                  ComputerName = ComputerName.Remove(0, "CN=".Length);
              compList.Add(ComputerName);
          }
  
          mySearcher.Dispose();
          entry.Dispose();
  </code></pre>
  
  <p>what i want is.. along with these computernames get the computer names that belong to different OU's within the domain...</p>
  
  <p>any suggestions... thanks</p>