Number of New Emails in Sent Items within 24 hours


I am trying to create a simple script that will show me how many new email messages have been added to the Sent Items folder.  I am new to powershell so I ave basically put together a script from browsing the web, however its not working as expected.

Here is the script  I have so far

Get-MailboxFolderStatistics info -folderscope SentItems (Get-Date).AddDays(-1).ToString("ddMMyyy") | select name,itemsinfolder

I know this does not work but was wondering if anyone is able to add/subtract what I have done wrong.

or point me to a website that has a decent script

many thanks

May 28th, 2015 6:00pm

Unfortunately I don't have access to exchange to test or do any modification but hopefully below will help you with searching for sent-items (if it works on Exchange 2013) you can modify the select command to only show the SentItems, and then it's just a case playing with the Date, or you may be able to select the date, i can't pipe anything to Get-Member to find out :)

Hope this helps

Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 6:25pm

thank you, I will try this tomorrow
May 28th, 2015 6:54pm

The above given reference looks good to resolve your concern and find out the reports of all folders into exchange server.

By the way, for more depth reporting you can also look into this automated solution ( that provides entire mailbox folder reports at granular level and helps to track oversized, inactive or hidden mailboxes with more than fifty reports.

Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 3:33am


Get-MailboxFolderStatistics can just retrieve information about the folders right now, it wont retrieve the information before.

To get the Number of E-mails Sent by one User within 24 hours, we can use MessageTrackingLog. Try this script:

[Int] $intSent = $intRec = 0

$date= (Get-Date).AddDays(-1)

Get-TransportService | Get-MessageTrackingLog -ResultSize Unlimited -Start $date -Sender "" -EventID RECEIVE | ? {$_.Source -eq "STOREDRIVER"} | ForEach { $intSent++ }

Write-Host "E-mails sent:    ", $intSent

I test in my lab, it work well.

Best Regards.

May 29th, 2015 3:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics