Message count reports using Exchange 2007.
Is this possible to get following reports from Exchange 2007?
1. Total incoming and outgoing emails since June 2010 till today
2. Average Monthly Calendar event created - if possible
May 7th, 2011 1:51am
You can use Powershell, and get the information from the message tracking logs BUT you need to make sure that you've retained the msg tracking logs since June 2010......
You can also script to get the Calendar events ..
Post this thread to "Official Scripting Guys Forum"
http://social.technet.microsoft.com/Forums/en-US/ITCG/threads?page=1
Regards, Pushkal MishrA
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2011 3:38am
Hi,
I can suggest you to use the following cmdlet for the total messages:
Sent messages: get-messagetrackinglog -start “06/01/2010 00:00:00” -end “05/07/2011 11:59:00” -eventid “send” -resultsize 9999999 | measure-object
Received messages: get-messagetrackinglog -start “06/01/2010 00:00:00” -end “05/07/2011 11:59:00” -eventid “receive” -resultsize 9999999 | measure-object
Regards from www.windowsadmin.info
May 7th, 2011 4:48am
I wouldn't use that.
The message tracking logs actually record a "Receive" even on sent emails, when the message is received from the storedriver by the transport server, and those would get counted as incoming emails.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2011 8:49am
Counting sent and received emails can be a little ambiguous.
You probably don't have message tracking logs going back that far, but assuming you do you need to decide whether you want to count sent/received emails before or after expansion.
Does 1 email to 10 recipients count as 1 email, or 10?[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
May 7th, 2011 9:00am
1. As stated in the previous post, if you have logs that go that far back then you can.
2. You can use LogParser to count send/receive which you can use for reporting.
Sukh
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2011 9:15am
As nice as LogParser is, you don't really need it for this. You can get those stats with a few lines of powershell code from the EMS.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
May 7th, 2011 9:38am
Thanks everyone, let me try above commands and will get back with update.
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2011 9:46am
As nice as LogParser is, you don't really need it for this. You can get those stats with a few lines of powershell code from the EMS.
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Can you please share the EMS code for this which is accurate?
May 7th, 2011 9:57am
Yes. But first, I need a litle more information.
1. Are you only after stats on emails sent/received externally, or both internal and external?
2. Do you want to count them before or after expansion ( does 1 email to 10 recipients count as 1 or 10?).
These will determine the eventid and source events you need to filter and accumulate on.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2011 10:04am
Yes. But first, I need a litle more information.
1. Are you only after stats on emails sent/received externally, or both internal and external?
2. Do you want to count them before or after expansion ( does 1 email to 10 recipients count as 1 or 10?).
These will determine the eventid and source events you need to filter and accumulate on.
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Thanks for your quick response; following are the answers of your questions.
1. I need stat of both internal set/receive and external set/receive.
2. Yes 1 email to 10 recipients count as 1.
Please let me know with EMS script to get all above. Thanks in advance for your help.
May 7th, 2011 10:14am
Also, how many hub transport servers do you have? If you have more than 1, you'll need to collect and aggregate the stats from all of them.
You can find out how far back your logs on each one go by:
get-messagetrackinglog -server <serername> -resultsize 1
That will get the first log entry on that server. The timestamp on that log should be the oldest log entry you have. You won't be able to get stats from the message tracking logs before that date. If you haven't modified your message tracking
log retention from the installation defaults, it will only go back 30 days.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2011 10:15am
I'm not at work, so I can't test this, but:
$sent = 0
$received = 0
get-messagetrackinglog -start “06/01/2010" -eventid “receive” -resultsize unlimited |
foreach-object {
if ($_.source -eq "storedriver"){$sent ++}
if ($_.source -eq "smtp"){$received ++}
}
Write-host "Sent $sent emails"
write-host "Received $received emails"[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
May 7th, 2011 10:28am
Thanks dear, really appreciated your help. It works perfectly fine.
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2011 10:34am
Glad I could help :)[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
May 7th, 2011 10:36am