From the course: PowerShell for Exchange Administration

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Testing Mail Flow

Testing Mail Flow

- So to test mailflow in Exchange using Powershell, you'll either need to be running inside of the Exchange management shell, or have an Exchange Powershell session open. So as you can see here, as I'm running the ISE, I've got an Exchange Powershell session already open. So testing mail flow has a fitting command called test mail flow. And if we run it, it attempts to send an email to the system mailbox, which you can see, it worked, on the first try anyway. But the command that has a lot more functionality than just that single-use case, we can test, here on line 25, test mailflow to a certain email address. So I've got Margaret's email here, she's an internal mailbox, and you can see I'm also setting the execution time out to be ten seconds. Otherwise, the default to 240 can take some time. And we can see that Margaret's mailbox is accepting emails currently, which is good. And then we can also test specific databases. So here on line 29, I'm going to test mailflow on the test…

Contents