Search:
Namespaces
Discussions
.NET v1.1
Feedback
Get Active Directory Object Type
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.languages.vb
.
Post a new message to this list...
Alex
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.DirectoryServices.
DirectoryEntry
(objpath)
Dim inmembers As
PropertyCollection
= 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
Reply to this message...
Shiva
You may use the objectCategory property to identify the individual object
type.
If (
DirectoryEntry
.Properties("objectCategory")(0) = "group") Then 'Call
recursively
Other possible values are:
DirectoryEntry
.Properties("objectCategory")(0) = "user"
DirectoryEntry
.Properties("objectCategory")(0) = "computer"
.... etc
Hope this helps.
"Alex" <
Click here to reveal e-mail address
> wrote in message
news:#
Click here to reveal e-mail address
...
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.DirectoryServices.
DirectoryEntry
(objpath)
Dim inmembers As
PropertyCollection
= 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
Reply to this message...
Alex
Perfect....Thanks Alex
"Shiva" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
System.Data.PropertyCollection
System.DirectoryServices.DirectoryEntry
System.DirectoryServices.PropertyCollection
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com