We help IT Professionals succeed at work.

Get-messagetracking log and date format

digitalco
digitalco asked
on
Medium Priority
368 Views
Last Modified: 2012-05-11
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?

Comment
Watch Question

Information Services Manager
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Ron MalmsteadInformation Services Manager
CERTIFIED EXPERT

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

Author

Commented:
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?
Ron MalmsteadInformation Services Manager
CERTIFIED EXPERT

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

Ron MalmsteadInformation Services Manager
CERTIFIED EXPERT

Commented:
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.
Ron MalmsteadInformation Services Manager
CERTIFIED EXPERT

Commented:
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...
Ron MalmsteadInformation Services Manager
CERTIFIED EXPERT

Commented:
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.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.