• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 540
  • Last Modified:

Message Tracking Logs Exchange 2010

Hi,

I have a customer who needs to know email sent from a specific address from January this year. Is there  a way of completing this through powershell?

I have tried the following with no success. IT keeps complaining about the end time.

get-messagetrackinglog -Sender "xyx@abc.com" -Server "ABC-EXCHANGE" -End "20/08/2014 13:42:00" | Select Sender,{$_.Recipients},{$_.RecipientStatus},MessageSubject,TimeStamp, EventId, Source,SourceContext,MessageId,InternalMessageId,ClientIP,ClientHostName,ServerIP,ServerHostName,ConnectorId,TotalBytes,RecipientCount,RelatedRecipientAddress,Reference,ReturnPath,MessageInfo | Export-Csv c:\mtr7.csv

Returns:

Cannot process argument transformation on parameter 'End'. Cannot convert value "20/08/2014 13:42:00" to type "System.D
ateTime". Error: "String was not recognized as a valid DateTime."
    + CategoryInfo          : InvalidData: (:) [Get-MessageTrackingLog], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-MessageTrackingLog
0
unrealone1
Asked:
unrealone1
  • 4
  • 3
1 Solution
 
SubsunCommented:
Try..
Get-Messagetrackinglog -Sender "xyx@abc.com" -Server "ABC-EXCHANGE" -Start (Get-date 1/1/2014) -End (Get-date)

Open in new window

Code will report the emails from 1st Jan 2014 to till date.

Ref : http://technet.microsoft.com/en-us/library/aa997573(v=exchg.150).aspx
0
 
unrealone1Author Commented:
Hi,

Thanks for your answer. I ran the report and the earliest date shows as: 28/07/2014  09:20:30. I set the result size to unlimited and that is all I got.

Liam
0
 
SubsunCommented:
Check the Maximum Age set for the tracking logs, by default it will be 30 days..
Get-TransportServer | Select Name,MessageTrackingLogMaxAge
Get-MailboxServer | Select Name,MessageTrackingLogMaxAge

Open in new window

To configure the same..
Ref : http://technet.microsoft.com/en-us/library/cc539071.aspx
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
VirastaRCommented:
0
 
unrealone1Author Commented:
Thanks, 30 days default setting. Is there any other way of getting an audit of all sent items?
0
 
SubsunCommented:
There is no conventional way to generate report, You can try with Search-Mailbox command to search in user mailbox and report the mails send by user...

Example.. Following code will search all emails in User1 mailbox send by user1@domain.com after specified date and dump the report to administrator mailbox SearchLog folder.
Search-Mailbox -Identity "User1" -SearchQuery 'Sent:> 01/01/2014 AND from:user1@domain.com' -TargetMailbox "administrator" -TargetFolder "SearchLog" -LogOnly -LogLevel Full

Open in new window

Ref : http://technet.microsoft.com/en-in/library/dd298173(v=exchg.150).aspx
         http://help.outlook.com/en-US/140/ms.exch.ecp.newmailboxsearch_searchquery.aspx
0
 
unrealone1Author Commented:
Subsun,

Thank you for your help. We have decided that searching through OWA is the easiest solution.

Thank you all for input.

Liam
0
 
unrealone1Author Commented:
Resolved.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now