I have a two site DAG, and the command is running from the alternate site where the databases are not currently being hosted. The following command...
Test-OutlookConnectivity -Protocol:TCP -TrustAnySSLCert:$true -MonitoringContext:$true
...errors with the following output:
An error occurred while trying to access mailbox CurrentlyHostingMBServerName.InternalDomainName, on behalf of user InternalDomainName\extest_bb13200232474Additional information:
[Microsoft.Exchange.Data.Storage.WrongServerException]: The user and the mailbox are in different Active Directory sit
es..
+ CategoryInfo : OperationStopped: (Microsoft.Excha...onnectivityTask:TestOutlookConnectivityTask) [Test-
OutlookConnectivity], CasHealthStorageErrorException
+ FullyQualifiedErrorId : F2F8AC0D,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
I thought this command would work based on the 'AllowCrossSiteRpcClientAccess: True' option on the DAG. The command works well if run a CAS server in the active DB site.