Test-OutlookConnectivity cmdlet fails with "Sequence contains no elements" error in Exchange Server

Applies to: Exchange Server 2016 Enterprise EditionExchange Server 2016 Standard EditionExchange Server 2013 Enterprise

Symptoms


When you run the Test-OutlookConnectivity test in an Exchange Server 2016 or 2013 environment, you receive the following warning:
WARNING: An unexpected error has occurred and a Watson dump is being generated: Sequence contains no elements
Sequence contains no elements
+ CategoryInfo : NotSpecified: (:) [Test-OutlookConnectivity], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Exchange.Management.Tasks.TestOutlookConnecti
vity
+ 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:
$db = (Get-Mailbox <Alias>).Database 
Then, run the Test-OutlookConnecivity cmdlet by using the database variable from the preceding Get-Mailbox cmdlet:
Test-OutlookConnectivity OutlookRpcDeepTestprobe\$db -RunFromServerId <ServerName> -MailboxId <Alias> 

More Information


For more information about this PowerShell cmdlet, see Test-OutlookConnectivity.