Lo siento pero no me sirve, yo pretendo recuperar la info de un usuario (Grupos de usaurio a los que pertenece, telefono, email, nombre completo, login, etc...)
He conseguido que me muestre algo de info con el siguiente codigo:
Código:
Private Sub cmdCargar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCargar.Click
Dim bol As Boolean
lista.Text = ""
Dim child As System.DirectoryServices.DirectoryEntry
For Each child In DE.Children
Select Case child.SchemaClassName
Case "User"
If child.Name = "agrau" Or child.Name = ("abustamante") Then
lista.Text += "Path: " & child.Path & vbCrLf
lista.Text += "AuthenticationTye: " & child.AuthenticationType & vbCrLf
lista.Text += "Guid: " & child.Guid.ToString & vbCrLf
lista.Text += "SchemaClassName: " & child.SchemaClassName.ToString & vbCrLf
lista.Text += "UsePropertyCache: " & child.UsePropertyCache.ToString & vbCrLf
lista.Text += "Native Guid: " & child.NativeGuid & vbCrLf
lista.Text += "Full Name: " & child.Properties("FullName").Value & vbCrLf
lista.Text += "Description: " & child.Properties("Description").Value & vbCrLf
lista.Text += "Last Login: " & child.Properties("LastLogin").Value & vbCrLf
lista.Text += "Login: " & child.Properties("Name").Value & vbCrLf
lista.Text += "Parent: " & child.Parent.ToString & vbCrLf
bol = False
bol = (child.Properties("userAccountControl").Value)
lista.Text += "Cuenta desactivada:" & bol & vbCrLf
lista.Text += vbCrLf & "=====================" & vbCrLf
End If
End Select
Next
End Sub
Con esto casi me bastaría, pero no logro que me saque todos los grupos a los que pertenece el usario. Asi mismo se que existe un ID único para cada usuario, creo que tendria que ser el GUID o NativeGuid, pero para los dos usuarios que busco me pone el mismo.
¿Alguien sabe donde puedo encontrar todas las opciones que puedo utilizar? (En la ayuda MSDN no apaece gran cosa sobre este tema, al menos lo que yo busco)
Muchas gracias