How can I tell if your AD / AM instance is running using C #?

I've seen a link to see if AD is working, but I'm not too sure if the same applies to AD / AM. One caveat is that I have to be able to check any AD / AM instance (any domain), provided that I have permissions.

+1


source to share


2 answers


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

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

      

One of the main reasons is the lack of RootDSE in AD / AM. You can add it manually, but by default you cannot use these handy search filters which use the LDAP: // Server / RootDSE syntax.

ADAM instances are separated by port numbers, so you need to specify the port based on the instance you want. This can be found in the server's Windows 2008 registry:



HKLM\SYSTEM\CurrentControlSet\Services\ADAM_InstanceName\Parameters

      

or you can run a command line query:

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

      

0


source


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



+1


source







All Articles