1

Here is the scenario that I am in and am stuck on how to get this the correct way.

What I'm looking for is a syntax that will provide me with statistics on what users have emailed "Sent" for the day.

I would like to know get information on what all users of a specific distribution group has emailed for the day.

I have tried the following to no avail. Get-Mailbox | Get-MailboxFolderStatistics -FolderScope SentItems | Where {$_.ItemsInFolder -gt 0} | -Start "06/14/2012 9:00AM" -End "06/14/2012 5:00PM" | Sort-Object -Property ItemsInFolder -Descending | select-object Identity,ItemsInFolder | export-csv c:\test.txt

Get-MessageTrackingLog -Start "06/14/2012 9:00AM" -End "06/14/2012 5:00PM" -Sender "" | measure-object - This one will only work on specified users, but I need to check the whole group.

If anyone could help me out. Thank you!!!

1 Answer 1

0

Try this script out. It grabs the member SMTP addresses from a Distribution Group and runs them against the message tracking logs to get a count for the time range for each member's e-mail address :

Import-Module C:\Temp\Exchange.psm1
$array = @()
$emails = Get-DistributionGroupMember "<group name>" | % {$_.primarysmtpaddress}
$start = "7/11/2012 9:00:00 AM"
$end = "7/11/2012 5:00:00 PM"
ForEach ($email in $emails) {
    $count = get-messagetrackinglog -Sender $email -EventID "SEND" -Start $start -End $end | measure-object | Select Count
    $array += @(,$email,$count)
    }
ForEach($row in $array)
    {  
    Write-Host $row
    }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .