exchange2007使用PowerShell检查邮箱满的用户

exchange的邮箱如果满了,则无法收到邮件,甚至导致邮箱无法打开。于是做了一个Powershell,来导出所有的列表。

1 $strPath = "d:\Script\mailfulldetect\result.txt"
2 
3 Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
4 Get-Mailbox  -OrganizationalUnit "corp.test.com.cn/department" | % { Get-MailboxStatistics -Identity $_.Alias } | ? {$_.StorageLimitStatus -ne "BelowLimit"} | select DisplayName,StorageLimitStatus | Out-File -FilePath $strPath 

在PS上使用exchange的命令提示符,需要先运行:Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
筛选OU使用Get-Mailbox,筛选邮箱是否已满使用Get-MailboxStatistics。

posted @ 2013-03-11 17:46  zhaofei_001  阅读(346)  评论(0编辑  收藏  举报