Track messages in Exchange 2010 with PowerShell

Some days ago, I was in a migration process from Exchange 2010 to Exchange 2013 cross-forest. When the migration of all users was done on the new Exchange 2013, I was wondering if messages were still delivered/routed by Exchange Server 2010.

How to track Message in Exchange 2010

Just run this cmdlet :

Ok great. Now you can adjust results. Here I get messages sent in the last hour :

So you can check if scripts or apps use the old exchange server as default SMTP server.

To go further

I decided to create a schedule task to run every hour this script and send results by email. So You need to configure the task to run every hour indefinitely.

Below is my script :

The result :

exc10-lastmails

About Nicolas 216 Articles
I work as a System Engineer, based in Switzerland with a primary focus on Microsoft technologies. I have 7 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSA: Windows Server 2012" and "Administering & Deploying SCCM" certified.