Christian Hans
asked on
Export list of all external senders (Exch2013/ExchOL)
Is there a way in PowerShell to export a list of all external email addresses that have sent to my company's users, say over the past month, in Exchange 2013 or Exchange Online?
ASKER
Thanks Andy, that will work on my Exchange 2013 servers, any ideas about Exchange Online? I realize that I'm limited to 30 days only.
Get-MessageTrace -Resultsize Unlimited -StartDate 12/5/2017 -EndDate 1/4/2018 | Select Received,SenderAddress,Rec ipientAddr ess,Subjec t | Export-CSV C:\MessageTrace_Results.cs v -NoTypeInformation
-Resultsize Unlimited parameter wont work, and without it, it seems like the output is limiting the results to 1000.
Get-MessageTrace -Resultsize Unlimited -StartDate 12/5/2017 -EndDate 1/4/2018 | Select Received,SenderAddress,Rec
-Resultsize Unlimited parameter wont work, and without it, it seems like the output is limiting the results to 1000.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yep, one would think that I could get more than 1000, but even the 5000 parameter wont work unfortunately.
$dateEnd = Get-Date
$dateStart = $dateEnd.AddDays(-30)
Get-MessageTrace -Resultsize 5000 -StartDate $dateStart -EndDate $dateEnd | Select-Object Received,SenderAddress,Rec ipientAddr ess,Subjec t | Export-CSV C:\MessageTrace_Results.cs v -NoTypeInformation
A parameter cannot be found that matches parameter name 'Resultsize'.
$dateEnd = Get-Date
$dateStart = $dateEnd.AddDays(-30)
Get-MessageTrace -Resultsize 5000 -StartDate $dateStart -EndDate $dateEnd | Select-Object Received,SenderAddress,Rec
A parameter cannot be found that matches parameter name 'Resultsize'.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I have recommended this question be closed as follows:
Split:
-- Naveen Sharma (https:#a42424697)
-- Andy M (https:#a42423697)
If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.
Pber
Experts-Exchange Cleanup Volunteer
I have recommended this question be closed as follows:
Split:
-- Naveen Sharma (https:#a42424697)
-- Andy M (https:#a42423697)
If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.
Pber
Experts-Exchange Cleanup Volunteer
-getmessagetrackinglog -resultsize unlimited -start "12/01/2017 00:00" -End "01/01/2018 23:59" -EventID "Deliver" | select Sender, Recipients
You will want to output it to a text file or csv.