So had a bit of a weird question today from a colleague, who wanted a quick way to find out how many emails have been sent or received by an individual mailbox.
So Windows PowerShell to the rescue .. First of all you will need the ExchangeOnline module which can be easily installed via the following cmdlet
Install-Module -Name ExchangeOnlineManagement
Type Connect-ExchangeOnline and login using the relevant permissions
Received Message Count
# Receive Messages $messages = Get-MessageTrace -RecipientAddress email@example.com -StartDate (Get-Date).AddDays(-1) -EndDate (Get-Date) $messages.count
Sent Message Count
# Sent Messages $messages1 = Get-MessageTrace -SenderAddress firstname.lastname@example.org -StartDate (Get-Date).AddDays(-1) -EndDate (Get-Date) $messages1.count
You will now get a number of received and sent messages.
The Author – Blogabout.Cloud