本示例为 Exchange2016

可使用 Get-InboxRule 命令获取邮箱规则

Get-InboxRule -Mailbox zhaodongwei

Exchange - Get-InboxRule 获取用户邮箱规则_第1张图片

批量导出

$Mailboxes = Get-Content E:\001scripts\InboxRule.txt
$Results =  foreach ($Mailbox in $mailboxes){
    Get-InboxRule -Mailbox $mailbox | Select-Object MailboxOwnerID,Name,priority,description
    }
$Results | Export-Csv -Path E:\001scripts\InboxRules.csv -Encoding utf8 

参考:https://technet.microsoft.com/zh-cn/library/dd351062(v=exchg.160).aspx