473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Enumerate AD groups

Can anyone point the way to some code I can use to get a listing of all the
groups in AD?

I am writing an application that is setting some access rights and before it
goes about it business I want to have the app check to make sure that the
groups it will be using are actually present. I have code that enumerates
the groups that belong to a specific user but nothing that will actually
just give me a listing of available groups.

--
Raymond R Cassick
CEO / CSA
Enterprocity Inc.
www.enterprocity.com
3380 Sheridan Drive, #143
Amherst, NY 14227
V: 716-316-7537
Blog: http://spaces.msn.com/members/rcassick/
Nov 21 '05 #1
4 2254
Ray Cassick (Home) wrote:
I am writing an application that is setting some access rights and
before it goes about it business I want to have the app check to make
sure that the groups it will be using are actually present. I have
code that enumerates the groups that belong to a specific user but
nothing that will actually just give me a listing of available groups.


Depends on how your AD is setup. If you have it set up so your groups are
listed under e.g. OU=Groups,DC=yourdomain,DC=com then you should just be
able to loop through the contents of that OU and get the CNs of all the
groups underneath it.

There's some code at http://www.codeproject.com/dotnet/ActiveDONavigator.asp
which might help with looping through the groups.
Nov 21 '05 #2
Hi,

Try this with the filter is objectclass=group

http://www.windowsformsdatagridhelp....3-9c76953e41cf

Ken
----------------
"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:O9**************@TK2MSFTNGP14.phx.gbl...
Can anyone point the way to some code I can use to get a listing of all
the groups in AD?

I am writing an application that is setting some access rights and before
it goes about it business I want to have the app check to make sure that
the groups it will be using are actually present. I have code that
enumerates the groups that belong to a specific user but nothing that will
actually just give me a listing of available groups.

--
Raymond R Cassick
CEO / CSA
Enterprocity Inc.
www.enterprocity.com
3380 Sheridan Drive, #143
Amherst, NY 14227
V: 716-316-7537
Blog: http://spaces.msn.com/members/rcassick/

Nov 21 '05 #3
Why do you and Cor call your web site "DataGrid Help" when there is so much
more that you guys have put on the site? Shouldn't it read something like
VB.HELP
--
Dennis in Houston
"Ken Tucker [MVP]" wrote:
Hi,

Try this with the filter is objectclass=group

http://www.windowsformsdatagridhelp....3-9c76953e41cf

Ken
----------------
"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:O9**************@TK2MSFTNGP14.phx.gbl...
Can anyone point the way to some code I can use to get a listing of all
the groups in AD?

I am writing an application that is setting some access rights and before
it goes about it business I want to have the app check to make sure that
the groups it will be using are actually present. I have code that
enumerates the groups that belong to a specific user but nothing that will
actually just give me a listing of available groups.

--
Raymond R Cassick
CEO / CSA
Enterprocity Inc.
www.enterprocity.com
3380 Sheridan Drive, #143
Amherst, NY 14227
V: 716-316-7537
Blog: http://spaces.msn.com/members/rcassick/


Nov 21 '05 #4
Hi,

It started off as a place to post datagrid tips because the
syncfusion website was having issues then. It kind of grew from there.

Ken
--------------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
Why do you and Cor call your web site "DataGrid Help" when there is so
much
more that you guys have put on the site? Shouldn't it read something like
VB.HELP
--
Dennis in Houston
"Ken Tucker [MVP]" wrote:
Hi,

Try this with the filter is objectclass=group

http://www.windowsformsdatagridhelp....3-9c76953e41cf

Ken
----------------
"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:O9**************@TK2MSFTNGP14.phx.gbl...
> Can anyone point the way to some code I can use to get a listing of all
> the groups in AD?
>
> I am writing an application that is setting some access rights and
> before
> it goes about it business I want to have the app check to make sure
> that
> the groups it will be using are actually present. I have code that
> enumerates the groups that belong to a specific user but nothing that
> will
> actually just give me a listing of available groups.
>
>
>
> --
> Raymond R Cassick
> CEO / CSA
> Enterprocity Inc.
> www.enterprocity.com
> 3380 Sheridan Drive, #143
> Amherst, NY 14227
> V: 716-316-7537
> Blog: http://spaces.msn.com/members/rcassick/
>


Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul Watson | last post by:
I see the list of standard encodings in Python 2.4.1 documentation section 4.9.2. Is there a method to enumerate the registered codecs at runtime?
6
by: Rich Crusco via DotNetMonster.com | last post by:
I am looking for a way to convert the following vbs script to c# Const ADS_SECURE_AUTHENTICATION = 1 strADMIN = "adminaccount" strPASSWORD = "password" strUSER = "useraccount" Set dso =...
0
by: Marek | last post by:
How can i enumerate groups and users from asp?
1
by: ginolard | last post by:
I'm trying to find out how to enumerate all local groups on a machine and list their membership. It's easy in Vbscript but it seems to be considerably more tricky in VB.NET. Am I missing...
21
by: James Stroud | last post by:
I think that it would be handy for enumerate to behave as such: def enumerate(itrbl, start=0, step=1): i = start for it in itrbl: yield (i, it) i += step This allows much more flexibility...
0
by: bcanter | last post by:
I found a file on the web that will allow you to enumerate groups but it was an .hta and the top level admins won't allow this. I need to give managers access to the groups so that when a new user is...
2
by: =?Utf-8?B?am1hZ2FyYW0=?= | last post by:
I'm trying to get a list of user accounts on the local computer - the same list you see when you are about to log in to Windows XP or Vista. This needs to work on a home computer (not connected to...
3
by: interuser | last post by:
Hi I want to enumerate all groups of an active directory. How do I do that? Thanks
0
by: PRR | last post by:
Here is a code i found on "how to enumerate appdomains in a current process". The original code was posted by Thomas Scheidegger Add the following as a COM reference -...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.