本示例为 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
原文地址:http://blog.51cto.com/zhaodongwei/2087239
时间: 2024-10-30 22:15:51