Domain.FindAllDiscoverableDomainControllers 方法
定义
查找此域中的所有可发现域控制器。Finds all of the discoverable domain controllers in this domain.
重载
| FindAllDiscoverableDomainControllers(String) |
查找此域中的所有可发现域控制器,它们也在指定的站点中。Finds all of the discoverable domain controllers in this domain that are also in the specified site. |
| FindAllDiscoverableDomainControllers() |
查找此域中的所有可发现域控制器。Finds all of the discoverable domain controllers in this domain. |
FindAllDiscoverableDomainControllers(String)
查找此域中的所有可发现域控制器,它们也在指定的站点中。Finds all of the discoverable domain controllers in this domain that are also in the specified site.
public:
System::DirectoryServices::ActiveDirectory::DomainControllerCollection ^ FindAllDiscoverableDomainControllers(System::String ^ siteName);
public System.DirectoryServices.ActiveDirectory.DomainControllerCollection FindAllDiscoverableDomainControllers (string siteName);
member this.FindAllDiscoverableDomainControllers : string -> System.DirectoryServices.ActiveDirectory.DomainControllerCollection
Public Function FindAllDiscoverableDomainControllers (siteName As String) As DomainControllerCollection
参数
- siteName
- String
从中搜索域控制器的站点名称。The name of the site to search for the domain controllers.
返回
一个 DomainControllerCollection,其中包含由此方法找到的域控制器对象。A DomainControllerCollection that contains the domain controller objects that were found by this method.
例外
目标服务器忙或不可用。The target server is either busy or unavailable.
siteName 是一个空字符串。siteName is an empty string.
siteName 为 null。siteName is null.
已释放此对象。The object has been disposed.
注解
可以通过查询 DNS SRV 记录找到可发现的域控制器。You can find discoverable domain controllers by querying DNS SRV records. 如果域控制器未为指定站点注册 SRV 记录,则此方法不会返回该记录,即使域控制器在物理位置位于该站点中。If a domain controller does not register an SRV record for the specified site, it will not be returned by this method, even if the domain controller is physically located within that site.
此方法将返回注册指定站点的 SRV 记录的所有域控制器,即使它们不在该站点内的物理位置。All domain controllers that register an SRV record for the specified site will be returned by this method, even if they are not physically located within that site.
另请参阅
适用于
FindAllDiscoverableDomainControllers()
查找此域中的所有可发现域控制器。Finds all of the discoverable domain controllers in this domain.
public:
System::DirectoryServices::ActiveDirectory::DomainControllerCollection ^ FindAllDiscoverableDomainControllers();
public System.DirectoryServices.ActiveDirectory.DomainControllerCollection FindAllDiscoverableDomainControllers ();
member this.FindAllDiscoverableDomainControllers : unit -> System.DirectoryServices.ActiveDirectory.DomainControllerCollection
Public Function FindAllDiscoverableDomainControllers () As DomainControllerCollection
返回
一个 DomainControllerCollection,其中包含由此方法找到的域控制器对象。A DomainControllerCollection that contains the domain controller objects that were found by this method.
例外
目标服务器忙或不可用。The target server is either busy or unavailable.
已释放此对象。The object has been disposed.
注解
可以通过查询 DNS SRV 记录找到可发现的域控制器。You can find discoverable domain controllers by querying DNS SRV records. 此方法仅返回那些注册了一般的非特定于站点的域控制器 SRV 记录的域控制器。Only those domain controllers that register the generic, non-site-specific, domain controller SRV record will be returned by this method.