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. sass 的学习

    导入scss @import "../../sass/variables.scss"; @import "../../sass/helper.scss"; @m ...

  2. apache设置头

    Apache 及开启压缩及Header信息隐藏:http://centilinux.blog.51cto.com/1454781/792820

  3. 点滴积累【C#】---C#实现上传照片到物理路径,并且将地址保存到数据库,

    效果: 思路: 首先,获取图片物理地址,然后进行判断将图片保存到文件夹下,再将图片的信息保存到数据库. 数据库: create table image1 ( ID ,) primary key, Im ...

  4. 探索Popupwindow-对话框风格的窗体(

    Android中还是会经经常使用到Popupwindow.一种类似于对话框风格的窗体,当然类似于对话框风格也能够用Activity,能够參考:Android中使用Dialog风格弹出框的Activit ...

  5. 进击的Android注入术《一》

    写在前面 这个系列本来是在公司的一个分享.内容比較多,所以就把这个PPT又一次组织整理成博客,希望对大家学习有所帮助.我会先以一个"短信拦截"作为样例,抛出问题,并提出了一种基于& ...

  6. application/x-www-form-urlencoded和multipart/form-data的区别

    在学习<form>元素时,enctype属性有三个值 enctype属性表格: 值 描述 application/x-www-form-urlencoded 在发送前编码所有字符(默认) ...

  7. 大型跨境电商 JVM 调优经历

    前提: 某大型跨境电商业务发展非常快,线上机器扩容也很频繁,但是对于线上机器的运行情况,特别是jvm内存的情况,一直没有一个统一的标准来给到各个应用服务的owner.经过618大促之后,和运维的同学讨 ...

  8. oracle /plsql 计算平闰年天数函数

    --计算平闰年天数函数 CREATE OR REPLACE FUNCTION f_ping_run_nian (i_year NUMBER --定义函数名 ) RETURN VARCHAR2 IS - ...

  9. 信号signal编号及意义及一般处理

    SIGQUIT:停止 SIGILL:illegal instruction SIGABRT:Abort SIGFPE:Float point exception SIGPIPE:Broken pipe ...

  10. CVPR(IEEE Conference on Computer Vision and Pattern Recognition)

    论文提交时间:11月份中旬左右会议时间:7月份左右 CVPR 2017: 网址:http://cvpr2017.thecvf.com/ 接受论文数:782