Is there any way in C# to receive computer properties using Active Directory ? [Archive] - C Board

PDA

View Full Version : Is there any way in C# to receive computer properties using Active Directory ?


motiz
04-28-2008, 11:53 PM
Dear Freinds,

PLEASE TRY TO ASSIST !!!

I am trying to receive a computer properties by using the active directory.
The properties may be: Computer Name, DNS name, Description etc ..

The follwoing code is used:



DirectorySearcher mySearcher = new DirectorySearcher(entry);
SearchResult result = mySearcher.FindOne();

foreach(SearchResult result in ySearcher.FindAll())
{
strName = result.GetDirectoryEntry().Name;
string allNames = this.GetProperties(result.GetDirectoryEntry());
}



However only the name of the computer is accessed.
Apprecaite your assistance how can I receive the DNS, Description Etc. ...

Is there any way in C# to receive computer properties using Active Directory ?

THanks,
moti