Here's one of a few I use that gives you some basic information to get you
started.  I give the resulting .csv files to the SQL folks and they slice,
dice and produce reports from the data.

This is from Exchange 2010.  I don't know if it will work as-is on 2007.
It is based on a pretty common Google search result for how to get this
type of information from Exchange's tracking logs, but I don't have the
original source handy at the moment.


----

add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010

$today = get-date
$rundate = $($today).toshortdatestring()
$hts = get-exchangeserver |? {$_.serverrole -match "hubtransport"} |%
{$_.name}
$outfile_date = ([datetime]$rundate).tostring("yyyy_MM_dd")
$outfile = "F:\Some\Path\raw_email_stats_" + $outfile_date + "_AM.csv"



foreach ($ht in $hts){

Get-MessageTrackingLog -server $ht -start "$rundate 07:00:00 AM" -End
"$rundate 12:59:59 PM" -resultsize unlimited | where {($_.eventid -eq
"DELIVER" -or $_.eventid -eq "RECEIVE") -and $_.source -eq "STOREDRIVER"} |
select-object
timestamp,eventid,sender,@{Name='Recipients';Expression={[string]::join(";",
($_.Recipients))}},totalbytes | export-csv $outfile -notype

}


On Thu, Mar 26, 2015 at 10:08 AM, Kelsey, John <[email protected]>
wrote:

> Exchange 2007 single server, single domain
>
>
>
> I have a request to provide some mail stats for some specific users.  They
> want to know the total number of emails received and sent for a given time
> period for specific users.  Is there a painless way to gather that data?
> Is there a way via Powershell to grab that?  Please forgive my Powershell
> noobness :/
>
>
>
> Thanks all!
>
>
>
> ***************************************
> *John C. Kelsey*
>
> Penn Highlands DuBois
> (:  814.375.3073
> 2  :   814.375.4005
> *:   [email protected]
> ***************************************
>
>
>
>
>
> This email and any attached files are confidential and intended solely for 
> the intended recipient(s). If you are not the named recipient you should not 
> read, distribute, copy or alter this email. Any views or opinions expressed 
> in this email are those of the author and do not represent those of Penn 
> Highlands Healthcare or its affiliates.. Warning: Although precautions have 
> been taken to make sure no viruses are present in this email, the company 
> cannot accept responsibility for any loss or damage that arise from the use 
> of this email or attachments.
>
>

Reply via email to