Link to home
Start Free TrialLog in
Avatar of unrealone1
unrealone1Flag for United Kingdom of Great Britain and Northern Ireland

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India 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
Avatar of unrealone1

ASKER

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
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
Thanks, 30 days default setting. Is there any other way of getting an audit of all sent items?
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
Subsun,

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

Thank you all for input.

Liam
Resolved.