Get Active Directory Object Type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex

    Get Active Directory Object Type

    Dear all

    I hope you might help me. Here my issue:

    I am using the following vb.net code to receive members from a windows 2000
    active directory group:
    objecttolook = "group"

    objlook = "member"

    Dim root As New System.Director yServices.Direc toryEntry(objpa th)

    Dim inmembers As PropertyCollect ion = root.Properties

    etc.

    The Problem is now that this group could contain either users, workstation
    account or other nested groups. How can I now determin what kind of object
    do this group contain. I can read out the members but I don't know what time
    they are. The idee is to call the function iterativ if if the member is a
    group.

    Hope somebody may gve me an idea.

    Thanks Alex


  • Shiva

    #2
    Re: Get Active Directory Object Type

    You may use the objectCategory property to identify the individual object
    type.

    If (DirectoryEntry .Properties("ob jectCategory")( 0) = "group") Then 'Call
    recursively

    Other possible values are:
    DirectoryEntry. Properties("obj ectCategory")(0 ) = "user"
    DirectoryEntry. Properties("obj ectCategory")(0 ) = "computer"
    .... etc

    Hope this helps.

    "Alex" <informatik@gmx .ch> wrote in message
    news:#3T64EnlEH A.2968@TK2MSFTN GP14.phx.gbl...
    Dear all

    I hope you might help me. Here my issue:

    I am using the following vb.net code to receive members from a windows 2000
    active directory group:
    objecttolook = "group"

    objlook = "member"

    Dim root As New System.Director yServices.Direc toryEntry(objpa th)

    Dim inmembers As PropertyCollect ion = root.Properties

    etc.

    The Problem is now that this group could contain either users, workstation
    account or other nested groups. How can I now determin what kind of object
    do this group contain. I can read out the members but I don't know what time
    they are. The idee is to call the function iterativ if if the member is a
    group.

    Hope somebody may gve me an idea.

    Thanks Alex



    Comment

    • Alex

      #3
      Re: Get Active Directory Object Type

      Perfect....Than ks Alex


      "Shiva" <shiva_sm@onlin e.excite.com> wrote in message
      news:uNJMRRnlEH A.3476@tk2msftn gp13.phx.gbl...[color=blue]
      > You may use the objectCategory property to identify the individual object
      > type.
      >
      > If (DirectoryEntry .Properties("ob jectCategory")( 0) = "group") Then 'Call
      > recursively
      >
      > Other possible values are:
      > DirectoryEntry. Properties("obj ectCategory")(0 ) = "user"
      > DirectoryEntry. Properties("obj ectCategory")(0 ) = "computer"
      > ... etc
      >
      > Hope this helps.
      >
      > "Alex" <informatik@gmx .ch> wrote in message
      > news:#3T64EnlEH A.2968@TK2MSFTN GP14.phx.gbl...
      > Dear all
      >
      > I hope you might help me. Here my issue:
      >
      > I am using the following vb.net code to receive members from a windows[/color]
      2000[color=blue]
      > active directory group:
      > objecttolook = "group"
      >
      > objlook = "member"
      >
      > Dim root As New System.Director yServices.Direc toryEntry(objpa th)
      >
      > Dim inmembers As PropertyCollect ion = root.Properties
      >
      > etc.
      >
      > The Problem is now that this group could contain either users, workstation
      > account or other nested groups. How can I now determin what kind of object
      > do this group contain. I can read out the members but I don't know what[/color]
      time[color=blue]
      > they are. The idee is to call the function iterativ if if the member is a
      > group.
      >
      > Hope somebody may gve me an idea.
      >
      > Thanks Alex
      >
      >
      >[/color]


      Comment

      Working...