hi all
anybody workd on how to get all computer names in the network in c#
i was tring this code , but i am getting error.
can anybody help in this code or provide working code ..
using System.DirectoryServices;help in highly appreciated..Code:string domain = "DomainNAme"; ArrayList ALLCPU = new ArrayList(); DirectoryEntry de = new DirectoryEntry(domain); //Iterate through entries to find the Computer names foreach (DirectoryEntry child in de.Children) { if (child.SchemaClassName == "Computer") { AllCPU.Add(child.Name); // Or whatever else you want to do with them } }
thanks & reg
PPCC


Reply With Quote
