运行环境:Exchange 2013/2016
通过foreach查询列表中的收件人是否均收到特定主题的邮件
$ErrorActionPreference="SilentlyContinue"
$nameid = Import-Csv D:\scripts\name.csv -Encoding Default
foreach ($n in $nameid)
{
Get-TransportServer | Get-MessageTrackingLog -Sender:monitorn@demo.com -Recipients:$n.name `
-MessageSubject "IT子系统警告" -EventId deliver `
-Start "2016/07/31 12:00:00" -End "2016/08/02 17:36:00" | `
select EventID,timestamp,sender,recipients,messagesubject | `
ft
}
网页题目:Powershell查询多个指定的收件人是否收到特定主题的邮件
链接地址:
http://cdweb.net/article/ieccii.html