Link to home
Start Free TrialLog in
Avatar of samiurrahiman mohd
samiurrahiman mohdFlag for India

asked on

List of Top 50 mail sending and receiving users in Exchange server 2016 on prem using with powershell scripting

Hello Experts Exchange,

I need to write a script for Emails send and receive for Exchange 2016. I have total 12 Exchange servers - 6 is in active and 6 are in passive servers.
Please let me know the syntax and how to start the script for Queue details, top 50 users every 2-3hrs monitor the User Email address,CSV format to send Emails the status and below details.  

Top 50 users per day and per hr.
Display Name
Email address
Server Name
No.of Mails Send/Recieve
Internal and External Emails
Avatar of Amit
Amit
Flag of India image

Try this tool:
https://www.promodag.com/products/exchange-server-reporting/

This gives you detailed report.
Avatar of samiurrahiman mohd

ASKER

Sure Amit.
I will try using with this tool. Seems it's 45days full trail version.
Can we try to fetch the report using with PowerShell script?
I tried to fetch the report using with this "GetMessageStatsToFile.ps1",but it's not fetching Display only Email address its giving the output.
Need display name as well on this report.Any idea how to write a program to get and include in the report.
How to exclude the Journaling servers in the report?

https://gallery.technet.microsoft.com/office/Exchange-200720102013-0ea7662b/view/Discussions
Here is the script details.

Thanks -Sami
How to setup a daily report of the top e-mail senders and recievers on Exchange 2016?
Still not able to get the much information on any of the website. :(
---------------------------------------------------
add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010

$output = Get-TransportServer | Get-MessageTrackingLog -Start (get-date).AddDays(-1) -EventID "SEND" -ResultSize Unlimited | Group-Object -Property Sender | %{ New-Object psobject -Property @{Sender=$_.Name;Recipients=($_.Group | Measure-Object RecipientCount -Sum).Sum}} | Where-Object {$_.Recipients -gt 100} | Sort-Object -Descending Recipients | Format-Table -AutoSize Sender,Recipients | Out-String

Send-MailMessage -From sysadmins@example.com -Subject "Exchange senders report: $(Get-Date -UFormat '%a, %D')" -To sysadmins@example.com -Body $output -SMTP mail.example.com
-------------------

As expected complete results not found on Exchange 2016.

Here are the more details.

Sender                                                           Recipients
------                                                           ----------
MicrosoftExchange329e71ec88ae4615bbc36ab6ce41109e@orange.com       6815
spectrumadmin@orange.com                                           1096
eronet-no-reply@orange.com                                         711
obsems@orange.com                                                             406
MAILER-DAEMON@postmaster1.orange.com                               352
MAILER-DAEMON@postmaster.orange.com                                287
I need List of Top 50 mail sending and receiving users in Exchange server 2016 on prem. Can you suggest me a PowerShell  script command or other option to find out the list.

Thanks-Sami
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.