Exchange Message Tracking

Hi Team,

when i type command:


get-messagetrackinglog -Sender "emailid" -Server "Servername" -EventID "DELIVER" -Star
t "17/2/2014 10:00:00 AM" -End "17/2/2014 11:54:00 AM"

Error Coming :

Cannot process argument transformation on parameter 'Start'. Cannot convert value "17/2/2014 10:00:00 AM" to type "Syst
em.DateTime". Error: "String was not recognized as a valid DateTime."
    + CategoryInfo          : InvalidData: (:) [Get-MessageTrackingLog], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-MessageTrackingLog


Can you please what is the suggestion on this to resolve it
LVL 5
Addy NadiaExpertAsked:
Who is Participating?
 
Dave GouldConnect With a Mentor Onsite SupportCommented:
It looks like you've got the date format wrong. You need to specify the date in US format.
ie -start "02/17/2014 10:00:00am"
0
 
michaelalphiCommented:
The naming convention for log files in the message tracking log directory is as : MSGTRKyyyymmdd-nnnn.log, MSGTRKMAyyyymmdd-nnnn.log, MSGTRKMDyyyymmdd-nnnn.log, and MSGTRKMSyyyymmdd-nnnn.log .
In which the placeholder "yyyymmdd" is the coordinated universal time (UTC) date on which the log file was created.
And, The placeholder "nnnn" is an instance number that starts at the value of 1 daily for each message tracking log file name prefix.
0
 
Addy NadiaExpertAuthor Commented:
As i checked time is set as per Australia time
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
jimmithakkarCommented:
Need to check date and time format in your system, please use below cmd

Get-Date [[-Date] <DateTime> ]

according to need to use cmd
0
 
Dave GouldOnsite SupportCommented:
what do get-culture and get-uiculture give you from the powershell console ?
if the latter is en-US then my first remark is correct
0
 
Addy NadiaExpertAuthor Commented:
When i Enter Get-Date command on the Server on which i am running the command that mentioned in question.

Date is comming like below :

Wednesday, 19 February 2014 1:04:20 PM

Now confirm what would be the amendment in the command to run the message tracking
0
 
Dave GouldOnsite SupportCommented:
Have you entererd the 2 commands that I posted earlier?
get-culture
get-uiculture

what were the results ?
0
 
Addy NadiaExpertAuthor Commented:
sorry but i want to know what this command will do, because i am going to run on Production Server..

Thanks/
0
 
Dave GouldOnsite SupportCommented:
Its only a display of the current settings. Here is what I get on my server:

[PS] D:\data\scripts>get-date
mercredi 19 février 2014 09:24:16

[PS] D:\data\scripts>get-culture
LCID             Name             DisplayName
----             ----             -----------
4108             fr-CH            French (Switzerland)

[PS] D:\data\scripts>Get-UICulture
LCID             Name             DisplayName
----             ----             -----------
1033             en-US            English (United States)
0
 
chriskelkCommented:
Get-Culture and Get-UICulture will only report on the language used on the server, it won't make any changes so nothing to worry about.

In any case, Get-MessageTrackingLog (it seems from Exchange 2010 onwards - it was fine for us under 2007) requires that dates are entered in US date format, regardless of the local regional settings.

You could wrap the Message Tracking request in a script, but that gets quite involved.  

I've attached a script I use as a starting point (written a while ago, so not the most elegant script ever).  This will work with dates in local format.  The parameters it uses are:
 -f (from) for the sender, which can be stated as an email address or username
 -t (to) for the recipient, which can be stated as an email address or username
 -s (start) for the start date or time (it'll assume midnight, if not stated)
 -e (end) for the end date or time (it'll assume 23:59 if not stated)
 -tw (two-way) to report a two-way conversation (i.e. messages sent to and from the recipient or sender, or between the recipient and sender)
 -ip to include IP addresses rather than hostnames in the report.

The script will search all transport servers, and produce a CSV (which it will then launch in Excel or notepad, or whichever application is associated with CSV files) in c:\Reports\mail.
track-msg.ps1.txt
0
 
Addy NadiaExpertAuthor Commented:
Hello,

Here the results of two commands..


[PS] C:\>get-culture

LCID             Name             DisplayName
----             ----             -----------
3081             en-AU            English (Australia)


[PS] C:\>Get-UICulture

LCID             Name             DisplayName
----             ----             -----------
1033             en-US            English (United States)
0
 
Dave GouldOnsite SupportCommented:
Its because of the en-US UICulture that I believe that you need to format your messageTrackingLog queries in the US format (see my first post). Have you actually tried it ?
0
 
Addy NadiaExpertAuthor Commented:
Good.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.