I use this code to retrieve that information:
Imports System.Management
Module User_Account_Info
Dim Scope As Management.ManagementScope
Dim Options As Management.ConnectionOptions
Dim qry As ObjectQuery
Public Function GetFullName(Optional ByVal strUserID As String = "", Optional ByVal strName As String = "") As String
Try
Scope = New ManagementScope("\\" & Environ("ComputerName") & "\root\cimv2", Options)
Scope.Connect()
qry = New ObjectQuery
If strUserID <> "" Then
qry.QueryString = "Select * From Win32_UserAccount Where Domain='Alliance' And Name='" & strUserID & "'"
Else
qry.QueryString = "Select * From Win32_UserAccount Where Domain='Alliance' And FullName Like '*" & strName & "*'"
End If
Dim Searcher As New ManagementObjectSearcher(Scope, qry)
Dim Item As ManagementBaseObject
For Each Item In Searcher.Get()
Return Item("FullName")
Next Item
Catch
Return ""
End Try
End Function
End Module
Hope this helps out.
Shane