Link to home
Start Free TrialLog in
Avatar of digitalco
digitalco

asked on

Get-messagetracking log and date format

So we have Exchange Hub Transport servers in US and Europe. One of the tasks we sometimes need to carry out is searching the Message Tracking log for users sending and receiving messages and so on.

We often have to search all Hubs globally.

http://technet.microsoft.com/en-us/library/aa997573(EXCHG.80).aspx

The below is an example:

Get-TransportServer | Get-messagetrackinglog -sender user1@domain.com -recipients user2@domain.com

It would be useful to add the -Start or -End dates to the search, but how does this work if we are searching between Hubs that use a different date format?

For example, if I wanted to search for messages from user1 to user2 after April 16th 2011, then this causes a problem. The US servers would have this as 4/16/2011 however the Europe servers would have this as 16/4/2011. If I check servers Regional Settings, then we can see that they use different date formats.

What do we need to do?

ASKER CERTIFIED SOLUTION
Avatar of Ron Malmstead
Ron Malmstead
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have you actually noticed any inconsistency by supplying start/end dates ?

I can't imagine MS would make such a novice mistake in their cmdlet or exchange for that matter.
Avatar of digitalco
digitalco

ASKER

Hi

So you're saying that even if we're searching ALL global Hubs, we should use the format of the server we're running the command from?
Exactly.

If all is well in the Microsoft world... the server you are running it against will convert it from your regional settings to UTC (universal) format anyway, in code.

If you supply 7pm...and you are in Germany...

That time is 1pm in the US EST, on the same day, and that is going to be the time it's is searching.
This is why when you send a calendar invite to someone cross country, if everything is setup correctly.. the time is converted to match so that you actually meet when you are supposed to.

Same concept applies to e-mail...
Oh yea...

If you supply ... 4/29/2011  - 4/30/2011  ...that encompasses   4/28/2011 6:00pm - 4/29/2011 5:59pm EST in the US if you are running it against a server in Germany.

This is a core function of windows, ...regional settings.  Things would be very confusing for all programmers without this consideration.