Home All Groups Group Topic Archive Search About

Querying Active Directory

Author
21 Aug 2006 10:31 AM
Vikas Manghani
Hi
Can anyone tell me, how can I search for Domain Administrators on a network.
What I mean is by using DirectorySearcher I can search for normal users,
which goes something like

DirectorySearcher ds = new DirectorySearcher(new DirectoryEntry());
ds.Filter="objectCategory=User";
ds.FindAll();

Similarly how can I search for administrative accounts?

Thanks in advance
Vikas

Author
21 Aug 2006 10:59 AM
David Jessee
Don't you hate it when someone just pastes a link and then you have to go
read it??

Well, here ya go:
http://www.netomatix.com/GroupMembers.aspx

This will work with getting the names of users that are in a given group
name (e.g. Dimain Admins).  Be aware that there isn't any type of a flag that
makes a group an "administrative group" so you'll have to know the name of
the group(s) that you want to query

If you're trying to

Show quote
"Vikas Manghani" wrote:

> Hi
> Can anyone tell me, how can I search for Domain Administrators on a network.
> What I mean is by using DirectorySearcher I can search for normal users,
> which goes something like
>
> DirectorySearcher ds = new DirectorySearcher(new DirectoryEntry());
> ds.Filter="objectCategory=User";
> ds.FindAll();
>
> Similarly how can I search for administrative accounts?
>
> Thanks in advance
> Vikas
>
Author
21 Aug 2006 1:01 PM
Vikas Manghani
Hey Thanks David.
It worked. Thanks again.

Regards
Vikas

Show quote
"David Jessee" wrote:

> Don't you hate it when someone just pastes a link and then you have to go
> read it??
>
> Well, here ya go:
> http://www.netomatix.com/GroupMembers.aspx
>
> This will work with getting the names of users that are in a given group
> name (e.g. Dimain Admins).  Be aware that there isn't any type of a flag that
> makes a group an "administrative group" so you'll have to know the name of
> the group(s) that you want to query
>
> If you're trying to
>
> "Vikas Manghani" wrote:
>
> > Hi
> > Can anyone tell me, how can I search for Domain Administrators on a network.
> > What I mean is by using DirectorySearcher I can search for normal users,
> > which goes something like
> >
> > DirectorySearcher ds = new DirectorySearcher(new DirectoryEntry());
> > ds.Filter="objectCategory=User";
> > ds.FindAll();
> >
> > Similarly how can I search for administrative accounts?
> >
> > Thanks in advance
> > Vikas
> >

AddThis Social Bookmark Button