Link to home
Start Free TrialLog in
Avatar of pi01162
pi01162Flag for Poland

asked on

Message tracking Exchange 2007 - Distribution groups

Hi,

I need to report how many messages (total numer of messages and size in Mb's) were received by exchange distribution groups.
I wrote some powershell script which counts only total messages sent to a distr. groups but i don't know how to add to the script info about total messages in Mb's.

Plese help.
Thanks in advance!
Get-TransportServer | foreach {get-messagetrackinglog -resultsize unlimited -server $_.Identity -start "2010-08-01 00:01" -end "2010-08-31 23:59" -EventId Expand | group-object RelatedRecipientAddress | select Name,Count} | export-csv c:\Exchange_Message_tracking_Distr_Groups.csv

Open in new window

Avatar of soostibi
soostibi
Flag of Hungary image

This gives a new column TotalMBs.
Get-TransportServer |
	foreach {get-messagetrackinglog -resultsize unlimited -server $_.identity -start "2010-08-01 00:01" -end "2010-08-31 23:59" -EventId Expand | 
		Group-Object RelatedRecipientAddress | Select-Object Name, Count, 
			@{n="totalMBs"; e={[int] (($_.group | Measure-Object -Property totalbytes -Sum).sum/1mb)}}
	}

Open in new window

This is even simpler:
Get-TransportServer | ?{$_.name -eq "iqjb-exchback"} |
	get-messagetrackinglog -resultsize unlimited -start "2010-08-01 00:01" -end "2010-08-31 23:59" -EventId Expand | 
		Group-Object RelatedRecipientAddress | Select-Object Name, Count, 
			@{n="totalMBs"; e={[int] (($_.group | Measure-Object -Property totalbytes -Sum).sum/1mb)}}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of soostibi
soostibi
Flag of Hungary image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pi01162

ASKER

Thanks!