I also have a much more complicated one that does counts and whatnot without the SQL folks being involved. It is based on the following:
On Wed, Sep 10, 2014 at 2:06 PM, Richard Stovall <[email protected]> wrote: > A couple of years ago I had to write some scripts to scrape our Exchange > logs so the sales weasel mgmt team could glean some statistics about the > e-mail activity of their rank and file sales weasels. > > :) > > I have AM and PM versions which run independently in the morning and the > afternoon. The PM version is reproduced below. It just creates a csv of > individual message activity for all user users with the following fields: > Timestamp,EventId,Sender,Recipients,TotalBytes. > > I copy the output to a network share where our SQL folks import it then > slice and dice as required using SSRS. > > HTH, > > RS > > --- > 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 = "C:\somedirectory\raw_email_stats_" + $outfile_date + "_PM.csv" > $copypath = "\\someserver\someshare" > > > > foreach ($ht in $hts){ > > Get-MessageTrackingLog -server $ht -start "$rundate 01:00:00 PM" -End > "$rundate 08:00:00 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 > > } > > copy-item "$outfile" "$copypath" > > > > > > On Tue, Sep 9, 2014 at 7:02 PM, Alice Goodman <[email protected]> > wrote: > >> Does anyone know of a script or application that could give me a count >> of incoming email and / or outgoing email by person for their mailbox? >> >> It is probably an HR request, but all I know is that the head of IT asked >> me for this. I can look at the Barracuda and see what comes in / out >> external to the company, but I don’t know how to show internal to the >> company. >> >> I am hoping someone on here has something like that already written or >> knows of one. >> >> Long time no chat.. J >> >> Many thanks, >> Alice >> >> >> >> > >
