110,568
社区成员
发帖
与我相关
我的任务
分享
DirectoryEntry root = new DirectoryEntry("LDAP://app.shgbit.com");
DirectoryEntry gbvision = root.Children.Find("OU=GBVision Computers");
DirectorySearcher searcher = new DirectorySearcher(gbvision);
searcher.Filter = "(objectClass=computer)";
foreach (SearchResult each in searcher.FindAll()) {
var box = each.GetDirectoryEntry();
Console.WriteLine(box.Properties["name"].Value);
}