Test-OutlookConnectivity cmdlet fails with Sequence contains no elements error in Exchange Server
Article
Applies to:
Exchange Server 2016 Enterprise Edition, Exchange Server 2016 Standard Edition, Exchange Server 2013 Enterprise, Exchange Server 2013 Standard Edition
Original KB number: 3186849
Symptoms
When you run the Test-OutlookConnectivity test in an Exchange Server 2016 or 2013 environment, you receive the following warning:
Console
WARNING: An unexpected error has occurred and a Watson dump is being generated:
Sequence contains no elements
+ CategoryInfo : NotSpecified: (:) [Test-OutlookConnectivity], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Exchange.Management.Tasks.TestOutlookConnectivity
+ PSComputerName : toys-e15-mbx1.tailspintoys.com
Cause
This issue occurs because the database value that's specified in the ProbeIdentity parameter is case-sensitive.
Resolution
To resolve this issue, determine the database name value by running the Get-Mailbox cmdlet, as follows:
Console
$db = (Get-Mailbox <Alias>).Database
Then, run the Test-OutlookConnecivity cmdlet by using the database variable from the preceding Get-Mailbox cmdlet:
This module examines how clients connect to Microsoft 365. It also provides instruction on how to configure name resolution and Outlook clients, and how to troubleshoot client connectivity.