"An Active Directory error 0x51 occurred" error when you run the "Setup /PrepareAD" command from a DC in Exchange 2013
Content provided by Microsoft
Applies to: Exchange Server 2013 EnterpriseExchange Server 2013 Standard Edition
This issue occurs in a domain that has no global catalog servers. This issue occurs after you apply Cumulative Update 5 or a later version of cumulative update for Microsoft Exchange Server 2013 (Cumulative Update 6 or Cumulative Update 7). When this issue occurs, you receive the following error messages:
[Time_Point_1]  [ERROR] An Active Directory error 0x51 occurred when trying to check the suitability of server 'domain_controller_name'. Error: 'Active directory response: The LDAP server is unavailable.'
[Time_Point_2]  [ERROR] The LDAP server is unavailable.
Note This issue will not occur if you upgrade the domain controller (DC) to a global catalog.
This issue occurs because of a change that introduces DC stickiness for writable sessions into Cumulative Update 5 for Exchange Server 2013.