I Have this code to get properties of user in active directory, maybe can help you, just add a button and if you want uncomment the first three comment lines and comment the first three lines of code after declarations.
(sorry the code is in spanish).
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim objetoUsuario, gruposSeguridad
Dim ultimoInicioSesion As String
Dim dominio As String
Dim nombreUsuario As String
Dim estadoCuenta As String
Dim gruposSeguridadUsuario As String = ""
'dominio = InputBox("Nombre del dominio Windows Server", "")
dominio = Environment.UserDomainName
'nombreUsuario = InputBox("Nombre de usuario del dominio", "")
nombreUsuario = Environment.UserName
' On Error GoTo cError
On Error Resume Next
objetoUsuario = GetObject("WinNT://" + dominio + "/" + nombreUsuario + ",user")
If Err.Number = 0 Then
If objetoUsuario.AccountDisabled = True Then
estadoCuenta = "Deshabilitado"
ultimoInicioSesion = "No existe"
Else
estadoCuenta = "Habilitado"
ultimoInicioSesion = objetoUsuario.Get("Lastlogin")
End If
gruposSeguridad = ""
For Each gruposSeguridad In objetoUsuario.Groups
If gruposSeguridadUsuario = "" Then
gruposSeguridadUsuario = gruposSeguridad.Name
Else
gruposSeguridadUsuario = gruposSeguridadUsuario + ", " + gruposSeguridad.Name
End If
Next
'Mostramos los datos del usuario
MsgBox("Nombre completo: " & objetoUsuario.Get("Fullname") & vbCrLf & _
"Descripción: " & objetoUsuario.Get("Description") & vbCrLf & _
"Nombre: " & objetoUsuario.Get("Name") & vbCrLf & _
"Carpeta de inicio: " & objetoUsuario.Get("HomeDirectory") & vbCrLf & _
"Script de inicio: " & objetoUsuario.Get("LoginScript") & vbCrLf & _
"Último inicio de sesión: " & ultimoInicioSesion & vbCrLf & _
"Perfil: " & objetoUsuario.Get("Profile") & vbCrLf & _
"Estado de la cuenta: " & estadoCuenta & vbCrLf & _
"Grupos seguridad: " & gruposSeguridadUsuario, vbInformation + vbOKOnly)
objetoUsuario = Nothing
Else
MsgBox("No existe el usuario " + nombreUsuario + " o el dominio " + dominio, vbExclamation + vbOKOnly)
End If
'cSalir:
' Exit Sub
'
'cError:
' MsgBox "Error " + CStr(Err.Number) + " " + Err.Description
' GoTo cSalir
End Sub