Created
November 24, 2016 02:55
-
-
Save at0dd/a699c963dc900d3d21e4a1238fe01850 to your computer and use it in GitHub Desktop.
Searches for emails and gets email tracking logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Searches a target mailbox for emails from a specific address and places the results in a specified mailbox, under a specified folder name. | |
Search-Mailbox "John Doe" -SearchQuery "from:'[email protected]'" -TargetMailbox "Your Mailbox" -TargetFolder "Folder Name" -LogLevel Full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Retrieves a log of emails from a specified date from a specified email address to a specified email address and places the results in a CSV file on your desktop. | |
Get-MessageTrackingLog -ResultSize Unlimited -Start "01/01/2000 12:00AM" -End "12/31/2000 11:59PM" -Sender "[email protected]" -Recipients "[email protected]" | Export-CSV "$env:userprofile\Desktop\Emails.csv" -NoTypeInformation -Encoding UTF8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment