Exchange
--
Questions
--
Followers
Top Experts
i need a powershell script to get mailbox from csv file like this one:
mailbox1@domain.com
mailbox2@domain.com
mailbox3@domain.com
.....
and get for each one the number of email received last 3 month.
all my server are exchange 2013.
thanks
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
how i can apply this for 100 emails address?
Make sure that your csv heading is Mailbox, then use the code below.
$Date = get-date
$Mailboxes = import-csv "c:\filename.csv"
ForEach ($User in $Mailboxes) {
$User.Mailbox
Get-MessageTrackingLog -Server <CASserver> -Start $Date.AddDays(-7) -Sender $User.Mailbox | measure
}
This will simply get the Count of all messages that were sent from each user that is in your csv file.
Will.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
What i need is count email received on this mailbox not sent
Thanks
$Date = get-date
$Mailboxes = import-csv "c:\filename.csv"
ForEach ($User in $Mailboxes) {
$User.Mailbox
Get-MessageTrackingLog -Server <CASserver> -Start $Date.AddDays(-90) -Recipient $User.Mailbox | measure
}
Just remember that if your message tracking logs are not set to 3 months back you will only be able to go back as far as what the transport settings are set to. By default it is 30 days.
Will.
i need to test this to be sure that the number of email i get from this script is the good number of only mail received and not sent &Â received.
it possible to get csv file result with mailbow and number like this:
test@domain.com,50
......
thanks

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Exchange
--
Questions
--
Followers
Top Experts
Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.