On Thu, Nov 13, 2008 at 6:02 PM, Aldric Giacomoni <aldric / trevoke.net> wrote:
> Most Active Directory access really just goes through LDAP and I don't
> know if it's possible through LDAP -- and if it's possible, how to do
> it, or who has implemented it in Ruby. I'd like to be able to get a list
> of computers in a domain, in a OU, etc....

http://www.petri.co.il/ldap_search_samples_for_windows_2003_and_exchange.htm

(first hit on google for "ldap active directory query examples")

Filter for computers:
    (objectCategory=computer)

To restrict to an OU, set the search base of the query to the OU.

For access from Ruby, look at net-ldap as suggested by Sammy Larbi.