Solved

Message tracking Exchange 2007 - Distribution groups

Posted on 2010-08-31
4
926 Views
Last Modified: 2012-05-10
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

0
Comment
Question by:pi01162
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 13

Expert Comment

by:soostibi
ID: 33567260
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

0
 
LVL 13

Expert Comment

by:soostibi
ID: 33567367
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

0
 
LVL 13

Accepted Solution

by:
soostibi earned 500 total points
ID: 33567376
Sorry, this is it:
Get-TransportServer | 
	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

0
 

Author Closing Comment

by:pi01162
ID: 33574734
Thanks!
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question