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

本示例爲 Exchange2016

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

Get-InboxRule -Mailbox zhaodongwei

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

批量導出

$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).aspxcode

相關文章
相關標籤/搜索