.NETGURU
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




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification