如何通过C#查明您的AD / AM实例是否启动并运行?

时间:2021-10-27 08:51:29

I saw a link to find out if AD was running, but am not too sure if the same applies to AD/AM. One caveat is that I should be able to check about any AD/AM instance (any domain) assuming I have permissions.

我看到一个链接,找出AD是否正在运行,但我不太确定AD / AM是否同样适用。一个警告是,我应该能够检查任何AD / AM实例(任何域),假设我有权限。

2 个解决方案

#1


0  

Performing LDAP queries against AD/AM and AD are very close in functionality. You just need to include a DNS prefix in your bind string as well as the port (if it's not the default 389):

针对AD / AM和AD执行LDAP查询的功能非常接近。您只需要在绑定字符串和端口中包含DNS前缀(如果它不是默认值389):

LDAP://ADAMServer:50000/DC=domain,DC=local

One major pain is the default absence of RootDSE in AD/AM. You can add it manually but by default you can't use those handy search filters that use the LDAP://Server/RootDSE syntax.

一个主要的痛苦是AD / AM中默认缺少RootDSE。您可以手动添加它,但默认情况下,您不能使用那些使用LDAP:// Server / RootDSE语法的便捷搜索过滤器。

The ADAM instances are separated by port numbers so you will need to indicate a port based on the instance you want. You can find this in the Windows 2008 registry of the server at:

ADAM实例由端口号分隔,因此您需要根据所需的实例指示端口。您可以在服务器的Windows 2008注册表中找到:

HKLM\SYSTEM\CurrentControlSet\Services\ADAM_InstanceName\Parameters

or you could perform a command line query:

或者您可以执行命令行查询:

c:\windows\adam\dsdbutil.exe "list instances"

#2


1  

the same approach applies to AD or to AD LDS (lightweight directory services, new name for ADAM). .NET examples at http://msdn.microsoft.com/en-us/library/x8wxt72e(VS.71).aspx

相同的方法适用于AD或AD LDS(轻量级目录服务,ADAM的新名称)。 http://msdn.microsoft.com/en-us/library/x8wxt72e(VS.71).aspx上的.NET示例

#1


0  

Performing LDAP queries against AD/AM and AD are very close in functionality. You just need to include a DNS prefix in your bind string as well as the port (if it's not the default 389):

针对AD / AM和AD执行LDAP查询的功能非常接近。您只需要在绑定字符串和端口中包含DNS前缀(如果它不是默认值389):

LDAP://ADAMServer:50000/DC=domain,DC=local

One major pain is the default absence of RootDSE in AD/AM. You can add it manually but by default you can't use those handy search filters that use the LDAP://Server/RootDSE syntax.

一个主要的痛苦是AD / AM中默认缺少RootDSE。您可以手动添加它,但默认情况下,您不能使用那些使用LDAP:// Server / RootDSE语法的便捷搜索过滤器。

The ADAM instances are separated by port numbers so you will need to indicate a port based on the instance you want. You can find this in the Windows 2008 registry of the server at:

ADAM实例由端口号分隔,因此您需要根据所需的实例指示端口。您可以在服务器的Windows 2008注册表中找到:

HKLM\SYSTEM\CurrentControlSet\Services\ADAM_InstanceName\Parameters

or you could perform a command line query:

或者您可以执行命令行查询:

c:\windows\adam\dsdbutil.exe "list instances"

#2


1  

the same approach applies to AD or to AD LDS (lightweight directory services, new name for ADAM). .NET examples at http://msdn.microsoft.com/en-us/library/x8wxt72e(VS.71).aspx

相同的方法适用于AD或AD LDS(轻量级目录服务,ADAM的新名称)。 http://msdn.microsoft.com/en-us/library/x8wxt72e(VS.71).aspx上的.NET示例