views:

108

answers:

2

Hello,

I want to search every computer known to LDAP and list all accounts on each computer which are Administrators.

I'm familiar with LDAP queries, I just don't know if this is possible, and if it is - what the syntax would be.

Thanks in advance,

Jim

A: 

You should go with System.DirectoryServices namespace.

There are some samples here: .Net Directory Services Programming - C# - Part 1

Rubens Farias
could you elaborate on downvote?
Rubens Farias
I'm guessing because it doesn't answer the question of what the LDAP syntax for the required query is?
Jim
As you're familiar with LDAP queries, I thought that won't be necessary; it is?
Rubens Farias
A: 

As far as I know, you can't do that. You can use, however, a script wich first performs the LDAP query and then uses the results to connect to each server and query members of the administrators group via LanManager API. If you want to do it in perl you should use Net::LDAP and Win32API::Net

DrNoone