Powershell Exchange Message Per Day Sent and Reveive
Powershell Exchange Message Per Day Sent and Reveive
# Initialize some variables used for counting and for output
Get-Date -UFormat "%Y-%m-%d-%H-%M" >>Per-day_recive.txt $Account="wendychen"
[Int64] $intSent = $intRec = 0
[Int64] $intSentSize = $intRecSize = 0
[String] $strEmails = $null $times=Import-CSV "d:\LOGTime.csv"
foreach ($time in $times)
{
# Start building the variable that will hold the information for the day
$starttime=$time.starttime
$endtime=$time.endtime
echo $starttime $endtime ssss
$intSent = $intRec = 0
(Get-TransportServer -Identity wendy-*) | Get-MessageTrackingLog -ResultSize Unlimited -Recipients "$Account" -Start "$starttime" -End "$endtime" | ForEach {
# Sent E-mail
If ($_.EventId -eq "RECEIVE" -and $_.Source -eq "STOREDRIVER")
{
$intSent++
$intSentSize += $_.TotalBytes
} # Received E-mails
If ($_.EventId -eq "DELIVER")
{
$intRec++
$intRecSize += $_.TotalBytes
}
} $intSentSize = [Math]::Round($intSentSize/1MB, 0)
$intRecSize = [Math]::Round($intRecSize/1MB, 0) $DataBase = Get-Mailbox -Identity $Account |Get-MailboxStatistics Write-Host "$Account,`nintSentSize=$intSentSize,`nReciveSize=$intRecSize" -ForegroundColor Yellow
$DataBase.DisplayName,$DataBase.DataBaseName,$starttime,$endtime,$intRecSize,$intSentSize -join ";">>d:\"$Account"-Per-day_recive.csv }
Powershell Exchange Message Per Day Sent and Reveive的更多相关文章
- Powershell Exchange Server UP Time
Server up time Get-ExchangeServer | where{$_.name -like'wendy*'} | %{ if(Test-Connection $_.name -Co ...
- Powershell检查邮件队列设置阈值,通过html形式进行邮件告警
为了完善公司的整体邮件质量,博主通过zabbix监控了exchange的所有微软推荐项目,并写了很多powershell来辅佐, 旨在更大程度上提高整体的邮件性能 这篇文章主要是讲通过powershe ...
- Exchange 2013 、Lync 2013、SharePoint 2013 三
前两篇介绍的是关于Exchange 与 Lync 之间的配制关系,这一篇介绍关于Lync.Exchange 与 SharePoint 之间建立信任关系. 首先要创建基于SSL的SharePoint A ...
- amqp 和 exchange 详细解释
amqp 的 excange 字面意思是一个交换机.他的任务是吧 消息 分配给消息队列. amqp 的 exchange 有三种,分别是 Direct , fanout 和 toppic.三种. ...
- 消息中间件——RabbitMQ(六)理解Exchange交换机核心概念!
前言 来了解RabbitMQ一个重要的概念:Exchange交换机 1. Exchange概念 Exchange:接收消息,并根据路由键转发消息所绑定的队列. 蓝色框:客户端发送消息至交换机,通过路由 ...
- RabbitMQ(Exchange交换机详解)(四)
Exchange:接收消息,并根据路由键转发消息所绑定的队列 ClientA,B将消息投递到交换机Exchange上,通过路由关系,投递到指定的queue1或者queue2上,通过监听投递到Clien ...
- Microsoft Win32 to Microsoft .NET Framework API Map
Microsoft Win32 to Microsoft .NET Framework API Map .NET Development (General) Technical Articles ...
- SSL握手步骤【收藏】
http://www.codeweblog.com/ssl-handshake-process-of-interaction-and/ SSL to send a message in the fol ...
- ssl 握手过程【收藏】
收藏几篇关于ssl handshake的好文 http://www.slashroot.in/comment/1242 SSL protocol, does its fantastic job of ...
随机推荐
- Effective Java-第4章
第4章 类和接口 类和接口是Java程序设计语言的核心,它们也是Java语言的基本抽象单元.Java语言提供了许多强大的基本元素,供程序员用来设计类和接口. 13. 使类和成员的可访问性最小化 要区别 ...
- IOS,objective_C中用@interface和 @property 方式声明变量的区别
转自:http://www.cnblogs.com/letmefly/archive/2012/07/20/2601338.html 一直有疑问,在objective_C中声明变量会有 2种方式,今天 ...
- Highcharts 图表js框架
纯js图表框架 ,图表传入Json数据 设置等等 , 如没特定要求可以考虑使用 优点 : 减轻服务器脚本运行负重 ,纯js执行,特效 缺点: 已知兼容性不高 帮助地址: http://w ...
- lua语言介绍
什么是Lua Lua是一个小巧的脚本语言. 是巴西里约热内卢天主教大学(Pontifical Catholic University of Rio de Janeiro)里的一个研究小组,由Rober ...
- hdu6076 Security Check 分类dp 思维
/** 题目:hdu6076 Security Check 链接:http://acm.hdu.edu.cn/showproblem.php?pid=6076 题意:有两个队列在排队,每一次警察可以检 ...
- android Bitmap用法总结(转载)
Bitmap用法总结1.Drawable → Bitmappublic static Bitmap drawableToBitmap(Drawable drawable) {Bitmap bitmap ...
- Window对应的类为java.awt.Windows, 它可独立于其他Container而存在
Window对应的类为java.awt.Windows, 它可独立于其他Container而存在,它有两个子类, Frame和Dialog, Frame是具有标题(title)和可伸缩的角(resiz ...
- redux sample with slim redux source code
code sample没有package.json文件,也就没有任何外部依赖,直接使用slim redux source code. slim resux只有90多行. nodejs对es6的impo ...
- Web监听器导图详解
监听器是JAVA Web开发中很重要的内容,其中涉及到的知识,可以参考下面导图: Web监听器 1 什么是web监听器? web监听器是一种Servlet中的特殊的类,它们能帮助开发者监听web中的特 ...
- ASP.NET动态添加控件一例
第一次单击页面中有3个Label,第二次单击有6个,第三次单击有9个,也就是每次单击要在上次的状态下再添加3个. 我的方法是,可以通过Session来保存上次的状态,一种解法如下: Test.aspx ...