Our on-premises SharePoint 2013 and 2010 Farms are using autodiscovery for the domain controller user profile sync.
Is there a way using PowerShell to find out which DC SharePoint is actually using?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
If we run the below PowerShell command, we will get all details about the domain controller.
So, now at the result of the Get-ADDomainController command, we can get to know which domain controller is used where or even you can pass the specific parameter to the above command.
For details, you may refer to the below article:
No, each request may route to a different Domain Controller (this is by design for any application that uses standard LDAP/GC lookups). Simply using PoSh to attempt to identify a DC will not indicate which DC is used in authentication or LDAP/GC queries.
You can set the ULS verbosity to a higher level, then yes you can see in ULS which DC was queried -- but again, this may be different each time an LDAP bind/request is made.