Re: DirectoryService and get all groups



Thank you Mark and Joe for the replies. It did help. I still cannot find the
information about the properties of the group objectCategory. You have given
me information on the name and groupType property. I was wondering if there
is a link to some information about group category and the other categories
of AD.


--
Jerry


"Jerry C" wrote:

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.




.



Relevant Pages

  • Re: DirectoryService and get all groups
    ... Dim dirEnt As New DirectoryEntry ... Dim srGroupsCol As SearchResultCollection = dsGroups.FindAll ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Problem when showing MdiChild form
    ... logic order wrong in showing the MDI child form. ... Dim childFormsAs Windows.Forms.Form ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Need help to create a macro or vba script to export data from
    ... I think you may try to use the code below to dump the cell one by one, ... Dim fso As New FileSystemObject ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.office.developer.vba)
  • RE: Need help to create a macro or vba script to export data from exce
    ... I think you may try to use the code below to dump the cell one by one, ... Dim fso As New FileSystemObject ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.office.developer.vba)
  • Re: DropDownList has SelectedValue which in invalid
    ... resulting in the invalid SelectedValue error. ... Dim ddl1 As DropDownList = CType, ... From your description you want to avoid getting the exception: ... Microsoft Online Support ...
    (microsoft.public.dotnet.framework.aspnet)