Exchange Powershell statistics on the number of email sending and receiving requests

Source: Internet
Author: User


In Exchange Powershell, we often encounter this situation when managing the daily mailbox sending and receiving count of Exchange servers. The boss wants to know how many emails each mailbox sends every day? How many emails do we send on our server per day or month? Or how many failed emails are sent to a specific address on the server? These cannot be implemented in Exchange graphical management, or they must be implemented using third-party tools. Next we will introduce the powerful Powershell management of Exchange, and several commands will solve the above problems. Www.2cto.com
1. collect statistics on the sending status of a HUB server over the last period: [PS] C: \ Windows \ system32> Get-Limits-ResultSize unlimited-Start "07/01/2012"-End "07/13/2012"-EventId "send"-Server "srvbj06" | the Measure-ObjectResultSize unlimited parameter shows all. Add Measure-Object as the numeric attribute of the computing Object and the sum of the string objects. If this parameter is removed, it is displayed one by one.

-Eventid can include BadMail, Defer Deliver, DSN, Expand, Fail, receivonmessage, Receive, Redirect, Resolve, Send, Submit, and Transfer. To retrieve the mail status. For example, the following uses the Fail parameter to retrieve the number of failed mails sent within a period of time: [PS] C: \ Windows \ system32> Get-MessageTrackingLog-ResultSize unlimited-Start "07/01/2012"-End "07/13/2012"-EventId "Fail"-Server "srvbj06" | Measure-Object

2. query the sending status of a mailbox: [PS] C: \ Windows \ system32> Get-MessageTrackingLog-ResultSize unlimited-Start "07/01/2012"-End "07/13/2012"-EventId "send"-Sender "luochen@bpdi.com.cn" | Measure-Object

The following shows which emails in this mailbox fail to be sent [PS] C: \ Windows \ system32> Get-MessageTrackingLog-ResultSize unlimited-Start "07/01/2012"-End "07/13/2012"-EventId "FAIL"-Sender luochen@XX.com

3. Send messages within a period of time by mailbox: add the Group-Object command to Group statistics. Here we calculate the Count value, Group the Count, and use select to filter. Www.2cto.com [PS] C: \ Windows \ system32> Get-MessageTrackingLog-ResultSize unlimited-Start "07/01/2012"-End "07/13/2012"-EventId "send" | Group-Object-Property: sender | select name, count

The above statistics show the sending status of each mailbox, And the sort is added below to sort the count value, so that you can find the mailbox that sends the most. [PS] C: \ Windows \ system32> Get-MessageTrackingLog-ResultSize unlimited-Start "07/01/2012"-End "07/13/2012"-EventId "send" | Group-Object-Property: sender | Select name, count | sort count-Descending

Author Li Yu

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.