码迷,mamicode.com
首页 > 其他好文 > 详细

监控DAG状态

时间:2015-07-13 22:09:21      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:

 

 

Add-PSSnapin microsoft.exchange*
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
$servers="mailbox1","mailbox2"
$i_Object = New-Object PSObject
foreach ($server in $servers)
    {
    $status=Get-MailboxDatabaseCopyStatus -Server $server | % {$_.status}
    if ($status | ? {$_ -notmatch "Healthy|Mounted" -and $_ -ne""} )
       {$status = "1"} #1表示OK
    else
       {$status = "0"} #0表示bad
    $i_object | Add-Member -MemberType NoteProperty -name $server -value $status
    }

$i_object |fl

 

监控DAG状态

标签:

原文地址:http://www.cnblogs.com/dreamer-fish/p/4644028.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!