Exchange2013 Get-messagetrackinglog PowerShell Use

Source: Internet
Author: User

The following describes the various PowerShell get-messagetrackinglog commonly used in exchange 2013.

Get-messagetrackinglog-resultsize Unlimited-start "06/01/2014 4:30:00 PM"-end "06/04/2014 5:17:00 pm" |where-object {$_ . Recipients-like "* @contoso. com"-and $_. Eventid-eq "Send"} | where {$_.recipients-like "*@ contoso.com"} | Select @{name= ' Recipients '; Expression={[string]::join (";", ($_). Recipients)}}, Sender, EventId, Timestamp, Source, MessageSubject | Export-csv "C:emailaddress_statistics_send.csv"

Get-messagetrackinglog-resultsize Unlimited-start "12/02/2014 4:20:00 PM"-end "12/02/2014 07:30:00 pm" |where-object {$ _. Eventid-eq "Send"} | Select @{name= ' Recipients '; Expression={[string]::join (";", ($_). Recipients)}}, Sender, EventId, Timestamp, Source, MessageSubject | Export-csv "C:dec2_email_statistics_send.csv"

Get-messagetrackinglog-resultsize Unlimited | Where {$_. Sender-match "@contoso. com"}-eventid "Send"-start "12/02/2014 4:20:00 PM"-end "12/02/2014 07:30:00 PM" | Select @{name= ' Recipients '; Expression={[string]::join (";", ($_). Recipients)}}, Sender, EventId, Timestamp, Source, MessageSubject | Export-csv "C:dec2_email_statistics.csv"


To find Received Emails:

Get-messagetrackinglog-resultsize Unlimited-start "12/02/2014 4:20:00 PM"-end "12/02/2014 07:30:00 pm" |where-object {$ _. Recipients-like "*@ contoso.com"-and $_. Eventid-eq "RECEIVE"} | where {$_.recipients-like "* @contoso. com"} | Select @{name= ' Recipients '; Expression={[string]::join (";", ($_). Recipients)}}, Sender, EventId, Timestamp, Source, MessageSubject | Export-csv "C:emailaddress_statistics_receive.csv"

Get-messagetrackinglog-resultsize Unlimited-start "12/02/2014 4:20:00 PM"-end "12/02/2014 07:30:00 pm" |where-object {$ _. Eventid-eq "RECEIVE"} | Select @{name= ' Recipients '; Expression={[string]::join (";", ($_). Recipients)}}, Sender, EventId, Timestamp, Source, MessageSubject | Export-csv "C:dec2_email_statistics_receive.csv"

Get-messagetrackinglog-resultsize Unlimited |where {$_. Messagesubject-like "Win a Lottery"} >> "C:usersusernamedesktopoutput.txt"

Get-messagetrackinglog-resultsize Unlimited-start "6/3/2013 12:29:00 PM"-end "6/6/2013 12:39:00 pm" |where {$_. Messagesubject-like "Update Your Social Security number"} >> "C:usersusernamedesktopoutput.txt"

Get-messagetrackinglog-server Hubservername-resultsize Unlimited |where-object {$_. Recipients-like "* @contoso. com"-and $_. Eventid-eq "Send"} | where {$_.recipients-like "* @contoso. com"} | FT eventid,timestamp,sender,recipients,messagesubject,@{label= "size"; Expression={$_. TOTALBYTES/1MB}} >>c: @contoso_emails. csv

Get-messagetrackinglog-server hubservername-resultsize unlimited-sender "[email protected]"-eventid "SEND"-Start "5/ 10/2012 12:29:00 PM "-end" 6/4/2012 12:39:00 pm "|ft Timestamp, Source, EventID, Recipients, MessageSubject, Recipientstat US, @{label= "size"; Expression={$_. TOTALBYTES/1MB}}

Get-messagetrackinglog-server hubservername-resultsize unlimited-start "12/01/2012 12:29:00 PM"-End "12/06/2012 12:39 : PM "|where {$_. Messagesubject-like "Click here to be SOX compliant"} |ft Timestamp, Source, EventID, Recipients, MessageSubject, Recipie NtStatus, @{label= "size"; Expression={$_. TOTALBYTES/1MB}}


Domain based search:to Find all emails from a specific domains in Exchange server (field-based query)

Get-messagetrackinglog-server hub1-resultsize unlimited-start "2/24/2013 12:29:00 AM"-End "2/26/2013 12:29:00 PM" |whe Re-object {$_. Sender-match "contoso.com"-and $_. Eventid-eq "Receive"} | FT eventid,timestamp,sender,recipients,messagesubject,@{label= "size"; Expression={$_. TOTALBYTES/1MB}}

Get-messagetrackinglog-resultsize Unlimited-start "9/10/2014 12:29:00 PM"-end "9/12/2014 12:39:00 pm" |where {$_. Messagesubject-like "Pay off Your Mortgage"} |fl Recipients, MessageSubject, Sender, Returnpath, EventID

Get-messagetrackinglog-recipients:[email protected]-eventid "RECEIVE"-start "05/25/2014 4:30:00 PM"-end "05/30/2014 5 : 17:00 PM "

Get-messagetrackinglog-recipients:[email protected]-eventid "RECEIVE"-start "05/25/2014 4:30:00 PM"-end "05/30/2014 5 : 17:00 PM "| Select @{name= ' Recipients '; Expression={[string]::join (";", ($_). Recipients)}}, Sender, EventId, Timestamp, Source, MessageSubject | Export-csv "C:emailaddress_statistics_foruser.csv"

Thank you!

Welcome to the old British Microsoft blog http://zyliday.blog.51cto.com/, is committed to provide you with more high-quality IT blog. Thank you!

AC qq:759147273

This article is from the "old British Microsoft Blog" blog, please be sure to keep this source http://zyliday.blog.51cto.com/760700/1723225

Exchange2013 Get-messagetrackinglog PowerShell Use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.