Using dssetcredent(x) with a specified domain controller

Started by mcvpjd3, November 06, 2015, 03:15:30 AM

Previous topic - Next topic

mcvpjd3

We are having some issues with a specific DC in our network so I want to write a script to do some checks. Basically every xx minutes I want to log on to the DC, do some LDAP queries and then logoff, and if any of these actions fail send a notification.

Most of this is fine, but the question is, can I use dssetcredent (or dssetcredentx) and specify a single server to do the authentication?

Thanks

td

The dsSetCredentx function is server agnostic.  You can specify a distinguished name  as the user name or use the domain name form of the user name but that only restricts authentication to trusted domains.  You will need to fashion the LDAP path to target a specific server in a call to one of the extender functions to authenticate on that server.   For example, you could try using the server's  name in the path - 'LDAP://servername/whatever'.  On many networks you would simply need to specify the Domain name to authenticate to a specific server -  'LDAP://domainname/whatever' but that is not always the case.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade