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.
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