1. 程式人生 > >Exchange - Get-InboxRule 獲取用戶郵箱規則

Exchange - Get-InboxRule 獲取用戶郵箱規則

Exchange獲取用戶郵箱規則

本示例為 Exchange2016

可使用 Get-InboxRule 命令獲取郵箱規則

Get-InboxRule -Mailbox zhaodongwei

技術分享圖片

批量導出

$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

Exchange - Get-InboxRule 獲取用戶郵箱規則