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
LVL 1
unrealone1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
ON-DEMAND: 10 Easy Ways to Lose a Password

Learn about the methods that hackers use to lift real, working credentials from even the most security-savvy employees in this on-demand webinar. We cover the importance of multi-factor authentication and how these solutions can better protect your business!

VirastaRUC Tech Consultant Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

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.