Tags


Logo_PowerShell

If you’re following best practice and running your Exchange Management from anything OTHER than your server, you might have stumbled into a small problem when you go to use the “Message Tracking” tool.  It doesn’t work.

The Reason is simple.  The Generated Script from the console “ASSUMES” (You in the back, keep the dirty joke to yourself) you’re running it on the server.

But the provided CmdLet still works if you copy it and drop it into a Powershell Session and add ONE little option.  -SERVER EXCHANGESERVERNAME — and of course correct the time… Grrrrrrr……

Yep.  That easy

So in this Window on remote workstation we want to look at all the received emails from 5:02pm to 5:12pm on my Exchange Server.

image

But Of course once I run it I get THIS on my screen.

 

‘Exchange Server “STUPIDWORKSTATIONNAME.Contoso.local” was not found.’

 

That’s because the developer “Assumed” we run ALL of our management tasks on the server……*SMACK*

 

We don’t, or at least I avoid it like the plague.  You see, if you DON’T do it on the server you CAN’T accidentally do things like oh……reboot the server.  Not easily at least…not by accident anyhow.

 

So to make this work all I have to do is click on “Go Back” and copy that commandlet from the Window where it says “Exchange Management Shell Command”

 

get-messagetrackinglog -EventID "RECEIVE" -Start "12/18/2009 05:02:00" -End "12/18/2009 05:12:00"

 

And just add on “-SERVER NAMEOFMYEXCHANGESERVER”

 

get-messagetrackinglog -EventID "RECEIVE" -Start "12/18/2009 05:02:00" -End "12/18/2009 05:12:00" –Server energizedtechmail.contoso.local

 

The other booboo I will point out to save you some headaches is the script generate produces the wrong time to query.   It doesn’t specify the “PM” part if you’re trying to examine emails after 12:00 noon.  So just edit those times appropriately

 

get-messagetrackinglog -EventID "RECEIVE" -Start "12/18/2009 17:02:00" -End "12/18/2009 17:12:00" –Server energizedtechmail.contoso.local

 

This will now correctly give you a listing of all received Emails on that particular Exchange server from 5:02pm to 5:12pm.  Remotely, from a workstation that has the Exchange Management tools.

And all this without getting out of your chair.

 

Be Lazy, Be Efficient, but just be SMART 🙂

 

Sean
The Energized Tech

Advertisements