Re: DirectoryService and get all groups
- From: Jerry C <jerryed@xxxxxxxxxxxxx>
- Date: Fri, 4 Aug 2006 07:41:01 -0700
Thanks for the examples I now have a list of the names of the groups (Code
below). I was wondering if there is some information about what the
Properties of the group. I looked in the "About Active Directory" section of
the MSDN library but there is no properties section for the group class in
the "Active Directory Schema" section. I am probably looking in the wrong
place.
I find a lot of groups in with this code and what I would like to do is know
if these groups are built in or created by the system administraor. I only
want the groups that are created by the adminstrator to manage users and not
the ones that are used by the system like printoperator and so on.
Dim strDomPath As String =
"LDAP://cd2k3domtest/DC=CDTESTDOM,DC=atestsys,DC=com"
Dim dirEnt As New DirectoryEntry(strDomPath)
Dim dsGroups As New DirectorySearcher(dirEnt,
"(objectCategory=group)")
Dim srGroupsCol As SearchResultCollection = dsGroups.FindAll()
Dim srGroups As SearchResult
For Each srGroups In srGroupsCol
Dim ss As String
ss = srGroups.Properties("name").Item(0).ToString
Next
Thank all of you for your help.
--
Jerry
"Luke Zhang [MSFT]" wrote:
Hello Jerry,.
Here is an sample from MSDN:
Searching for Groups
http://msdn2.microsoft.com/en-us/library/ms180909(d=ide).aspx
If there is any thing unclear, please feel free to let us know.
Sincerely,
Luke Zhang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- Re: DirectoryService and get all groups
- From: Jerry C
- Re: DirectoryService and get all groups
- From: Marc Scheuner
- Re: DirectoryService and get all groups
- References:
- Re: DirectoryService and get all groups
- From: Joe Kaplan \(MVP - ADSI\)
- Re: DirectoryService and get all groups
- From: Luke Zhang [MSFT]
- Re: DirectoryService and get all groups
- Prev by Date: Re: Impersonate via a remote workgroup
- Next by Date: 2.0 Forms authentication event that fires every time a user is authenticated
- Previous by thread: Re: DirectoryService and get all groups
- Next by thread: Re: DirectoryService and get all groups
- Index(es):
Relevant Pages
|