I'm working on a project where I am programmatically checking all the users for a given domain (and there are several domains). For example, I'll use a LDAP query like this:
"LDAP://DC=CA,DC=microsoft,DC=com" with a .Filter = ("(objectClass=user)"). Everything is fine.
CA is mapped to go to CA-server1. All users are returned poperly.
Apparently at 2 remote locations, the primary domain controller does not have the pwdLastSet and useraccountcontrol fields setup properly on CA-server1 (for whatever reason, outside of my control). At each location, there is a secondary domain controller (which I'll reference as CA-server2)., which does have the correct values for each user; but I am unable to figure out how to query the second domain controller successfully for users. for example:
"LDAP://CN=CA-server2,OU=Domain Controllers,DC=CA,DC=microsoft,DC=com" this query will run, but does not return users.
Is there a way to still query DC=CA, but pull the users from a different server rather than the default server