Is the Test-Mailflow command supposed to work with Hybrid Exchange

ComputerHabit 986 Reputation points
2024-11-05T16:34:54.58+00:00

When using the command Test-Mailflow it always fails.

TestMailflowResult : FAILURE

I get the email but the command fails.

Is this command supposed to work in Hybrid scenarios? I don't see how it does a confirmation.

All email is flowing like it should so it feels like it's a bad command.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,611 questions
{count} votes

Accepted answer
  1. Alex Zhang-MSFT 2,065 Reputation points Microsoft Vendor
    2024-11-06T02:25:45.3866667+00:00

    Hello, @ComputerHabit,

    Welcome to the Microsoft Q&A platform!

    The “Test-Mailflow” command in Exchange is used to test the mail flow in your organization. In a hybrid scenario, it may not always work as expected due to interactions between the local server and Office 365, or other configurations may be required. Here are some steps you can take to try to troubleshoot and possibly resolve the issue:

    1.Check mailbox database operation: Ensure that the mailbox databases and servers involved are in order.

    Get-MailboxDatabaseCopyStatus 
    Get-MailboxServer
    

    2.Check Hybrid Configuration and Connectors: Ensure that the hybrid configuration settings are correct. The Hybrid Configuration Wizard (HCW) should be run to establish the necessary connectors and settings. Make sure the connectors between the on-premises environment and Office 365 are properly configured.

    Get-SendConnector 
    Get-ReceiveConnector
    

    3.Permissions: Ensure that you have the required permissions to run this command (Find the permissions required to run any Exchange cmdlet | Microsoft Learn). Sometimes insufficient permissions can cause the command to fail.

    4.Latency and Timeouts: Check the “ExecutionTimeout” and “ErrorLatency” parameters. If the test message takes too long to be delivered, the command might time out and report a failure even if the email eventually arrives.User's image

    User's image 5.Diagnostic Logging: Enable diagnostic logging to gather more details about the issue (Set-EventLogLevel (ExchangePowerShell) | Microsoft Learn).


    If the answer is helpful please click on ACCEPT ANSWER as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.

    Thank you for your support and understanding.

    Best Wishes,

    Alex Zhang


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.