Hi,
In this below code i can get the user details from network systems but i am unable get the machine name(computername)..is there any to get this computer name but i can get the machine name in ComputerPrincipal method but not user details...i tried on LDAP method also but no use...same issue..
using (var context = new PrincipalContext(ContextType.Domain, "Domainname"))
{
using (var searcher = new PrincipalSearcher(new UserPrincipal(context)))
{
foreach (var result in searcher.FindAll())
{
string gg = result.DisplayName;
string ggg = result.Description;
DirectoryEntry de = result.GetUnderlyingObject() as DirectoryEntry;
Console.WriteLine("First Name: " + de.Name);
string name = de.Name;
name += de.Username;
Console.WriteLine("First Name: " + de.Properties["name"].Value);
Console.WriteLine("Last Name : " + de.Properties["l"].Value);
...
Go to the complete details ...