VB.net Active Directory:如何从OU中的OU读取PC列表

编程入门 行业动态 更新时间:2024-10-28 04:23:57
本文介绍了VB Active Directory:如何从OU中的OU读取PC列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我正在开发一个程序,该程序需要从OU结构中向下几层的Active Directory中读取PC列表. 我需要访问的AD路径是这样的: company-Divison1-Site1-电脑 Division 1,Site1和Computers都是OU. 问题是我在网上找到的任何教程都显示了如何仅从Active Directory中读取所有PC.在我的公司中,这将超过22,000台PC. 我需要使用VB从上述路径中的计算机" OU中读取所有PC,或者至少读取"Site1" OU中的所有计算机. 有人可以在这里向我指出正确的方向,还是提供实现此目的的代码示例? 非常感谢.

Hi Everyone, I''m working on a program that needs to read a list of PC''s from Active Directory a few levels down in the OU structure. The AD path I would need to access is this: company - Divison1 - Site1 - Computers Division 1, Site1 and Computers are all OUs. Problem is any tutorials I have found online show how to read only ALL PC''s from Active Directory. That would amount to over 22,000 PCs in my company. I need to read all PC''s from the ''Computers'' OU in the above path or at least all computers in the ''Site1'' OU using VB Could someone point me in the right direction here or provide code samples for accomplishing this? Many Thanks.

推荐答案

在所有这些示例中,它们都通过以下路径连接到域控制器:''LDAP://DC=fabrikam,DC=com''.您只需要更加具体,并扩展该路径以包含OU路径即可:''LDAP://OU=someContainer,DC=fabrikam,DC=com''.请注意,使用这样的路径会限制您的结果.您不能使用RDN. In all of those examples, they all connect to a domain controller with a path something like: ''LDAP://DC=fabrikam,DC=com''. You should just have to be more specific and expand that path to include the OU path: ''LDAP://OU=someContainer,DC=fabrikam,DC=com''. Note, using a path like this limits your results. You cannot use RDN''s.

更多推荐

VB.net Active Directory:如何从OU中的OU读取PC列表

本文发布于:2023-11-09 03:21:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571257.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:列表   Active   net   VB   PC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!