Using Configure-EnterprisePartnerApplication.ps1 in a multi domain controller environment

You use the Configure-EnterprisePartnerApplication.ps1 to create partner application to be used for OAuth with SharePoint 2013 and Lync 2013. The script creates a mail user and assigns management roles to that mail user. When running the script in an environment with multiple Active Directory domain controllers in the site, you might see the script failing….