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的更多相关文章

  1. Powershell Exchange Server UP Time

    Server up time Get-ExchangeServer | where{$_.name -like'wendy*'} | %{ if(Test-Connection $_.name -Co ...

  2. Powershell检查邮件队列设置阈值,通过html形式进行邮件告警

    为了完善公司的整体邮件质量,博主通过zabbix监控了exchange的所有微软推荐项目,并写了很多powershell来辅佐, 旨在更大程度上提高整体的邮件性能 这篇文章主要是讲通过powershe ...

  3. Exchange 2013 、Lync 2013、SharePoint 2013 三

    前两篇介绍的是关于Exchange 与 Lync 之间的配制关系,这一篇介绍关于Lync.Exchange 与 SharePoint 之间建立信任关系. 首先要创建基于SSL的SharePoint A ...

  4. amqp 和 exchange 详细解释

    amqp  的 excange 字面意思是一个交换机.他的任务是吧 消息 分配给消息队列. amqp 的  exchange 有三种,分别是 Direct , fanout 和 toppic.三种. ...

  5. 消息中间件——RabbitMQ(六)理解Exchange交换机核心概念!

    前言 来了解RabbitMQ一个重要的概念:Exchange交换机 1. Exchange概念 Exchange:接收消息,并根据路由键转发消息所绑定的队列. 蓝色框:客户端发送消息至交换机,通过路由 ...

  6. RabbitMQ(Exchange交换机详解)(四)

    Exchange:接收消息,并根据路由键转发消息所绑定的队列 ClientA,B将消息投递到交换机Exchange上,通过路由关系,投递到指定的queue1或者queue2上,通过监听投递到Clien ...

  7. Microsoft Win32 to Microsoft .NET Framework API Map

    Microsoft Win32 to Microsoft .NET Framework API Map .NET Development (General) Technical Articles   ...

  8. SSL握手步骤【收藏】

    http://www.codeweblog.com/ssl-handshake-process-of-interaction-and/ SSL to send a message in the fol ...

  9. ssl 握手过程【收藏】

    收藏几篇关于ssl handshake的好文 http://www.slashroot.in/comment/1242 SSL protocol, does its fantastic job of ...

随机推荐

  1. Mongodb更新数组$sort操作符

    db.students.update( { _id: 1 }, { $push: { quizzes: { $each: [ { id: 3, score: 8 }, { id: 4, score:  ...

  2. Atitit。激活某个程序的api attilax总结

    Atitit.激活某个程序的api attilax总结 1. 设置当前某窗口为当前窗口,有几个步骤要做:1.得到窗口句柄FindWindow2.切换键盘输入焦点AttachThreadInput3.显 ...

  3. atitit.html5动画特效----打水漂 ducks_and_drakes

    atitit.html5动画特效----打水漂  ducks_and_drakes 1. 原理 1 2. fly jquery插件 1 3. ---------code 2 4. 参考 4 1. 原理 ...

  4. layui中当悬浮在select的option上面是给不同的提示;

    $(document).on('mouseenter', '#paramsFather .layui-form-selected dl dd', function () { var data = $( ...

  5. Redis 的 fields 遇到的问题

    问题描述:本地和测试环境同使用一台redis服务器,本地环境和测试环境使用 key,fileds,value 中的fileds 来区分,例如 key fields value 004920c6eba1 ...

  6. php中Http请求方法和响应状态码整理教程

    HTTP请求报文由请求行(request line).请求头部(header).空行和请求数据4个部分组成,格式如下 可见请求行由请求方法字段.URL字段和HTTP协议版本字段3个字段组成,它们用空格 ...

  7. js----Navigator对象,查看浏览器信息,Screen对象,查看屏幕信息

    Navigator对象 Navigator 对象包含有关浏览器的信息,通常用于检测浏览器与操作系统的版本. 对象属性: 查看浏览器的名称和版本,代码如下: <script type=" ...

  8. jqgrid删除多行数据,删不全的解决方案

    功能实现: 删除选中的多条数据 bug: 总是删不干净,比如选中5条执行删除操作,后台全删掉了,可是前台仍然有剩余的几条,再次刷新会不见 错误代码: var ids = $("#grid-t ...

  9. linux grub 使用

    linux kernel 格式之 vmlinux.zImage.bzImage.vmlinuz.uImage vmlinux     是编译出来的未经压缩的原始内核文件,是linux接受的可执行文件格 ...

  10. libubox-uloop

    参考:libubox组件(3)——uloop uloop是提供事件驱动机制接口,类似libevent事件框架,基于epoll接口来实现的. uloop三大功能:事件管理(uloop_fd).超时管理( ...