简体   繁体   English

使用Active Directory查找服务器

[英]Find servers using Active Directory

is it possible to query Active Directory for servers? 是否可以查询Active Directory中的服务器?

In detail I want to retrieve information about instances of SQL Server / Sharepoint / IIS / and AnalysisServices servers of a domain using C#. 详细地说,我想使用C#检索有关域的SQL Server / Sharepoint / IIS /和AnalysisServices服务器实例的信息。

Which attributes do I have to check in order to find out which service is running on a machine? 为了找出计算机上正在运行的服务,我必须检查哪些属性?

If it is not possible to get this information from Active Directory, any other ideas are welcome. 如果无法从Active Directory获取此信息,则欢迎其他任何想法。

Here's a CodeProject article which creates and demonstrates a general-purpose network server enumerator - you can pick what type of server(s) you're interested in, and have a list of server matching that criteria enumerated from your network. 这是CodeProject的文章 ,该文章创建并演示了通用网络服务器枚举器-您可以选择感兴趣的服务器类型,并从网络中枚举符合该条件的服务器列表。 It uses routines from the netapi32.dll and surfaces them in a nice, C# compatible way. 它使用netapi32.dll中的例程,并以一种与C#兼容的良好方式显示它们。

替代文字

Pretty slick stuff! 漂亮的东西!

In AD, of course, you could also enumerate the servers based on the ObjectCategory - but I'm not sure if and how you could distinguish them into separate roles (SQL server, DC etc.). 当然,在AD中,您也可以枚举基于ObjectCategory的服务器-但我不确定是否以及如何将它们区分为单独的角色(SQL Server,DC等)。

Another CodeProject article shows how to enumerate objects in general in AD - you can definitely enumerate the computers ( objectCategory=computer ) from AD, but I'm not sure you can limit what you'll get back ahead of time with an LDAP filter... 一篇CodeProject文章展示了如何在AD中一般枚举对象-您可以肯定地从AD枚举计算机( objectCategory=computer ),但是我不确定您可以限制使用LDAP筛选器提前获得的内容。 ..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM