Geeks With Blogs

News


Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done

Active Directory .NET System.DirectoryServices - Dump Schema Information

original article

http://www.codeproject.com/aspnet/adsi1.asp?msg=757258

 

Try

'---------------------------------------------------------------

'build me.ActiveDirectoryPropertyList

'the list should contain key-value pairs that match with the properties

'(e.g. DisplayName) of this class

' Key: displayname, Value: Vinyard, Rodney (Consultant)

'---------------------------------------------------------------

Dim result As SearchResult

Dim strKey As String

For Each strKey In resultPropertyCollection.PropertyNames

Dim obProp As Object

For Each obProp In resultPropertyCollection(strKey)

Dim duhString As String = "Key: " + strKey + ", Value: "

Dim duhValue As String = "?"

Try

duhValue = CStr(obProp)

Catch ex2 As Exception

'do nothing

End Try

duhString += duhValue

System.Diagnostics.Debug.WriteLine(duhString)

_sb.Append(Microsoft.VisualBasic.vbCrLf + duhString)

Next

Next

Catch ex As Exception

_sb.Append(Microsoft.VisualBasic.vbCrLf + ex.ToString)

End Try

End Sub

Private _sb As New System.Text.StringBuilder

Public ReadOnly Property ActiveDirectoryPropertyList() As String

Get

Return _sb.ToString

End Get

End Property

Posted on Wednesday, January 17, 2007 7:14 AM Active Directory | Back to top


Comments on this post: Active Directory .NET System.DirectoryServices - Dump Schema Information

# re: Active Directory .NET System.DirectoryServices - Dump Schema Information
Requesting Gravatar...
So simple? Did you implement it? If so it's useful.
Left by custom paper on May 29, 2010 12:13 AM

# re: Active Directory .NET System.DirectoryServices - Dump Schema Information
Requesting Gravatar...
You raise a lot of questions in my head; you wrote an excellent post, but this post is also mind provoking, and I will have to ponder it some more; I will be back soon.
Left by thesis writing on May 31, 2010 3:24 AM

Your comment:
 (will show your gravatar)


Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net