如果你正在寻找特定的消息,有许多不同的 Exchange 2007 服务器,此脚本可以帮助你!
PowerShell
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
$strRecipient = Read-Host “Enter part or recipient e-mail address like *toto* ”
#$strSender = Read-Host “Enter part or sender e-mail address”
#$strSubject = Read-Host “Enter part of the subject”
$strStart = Read-Host “Enter start date DD-MM-YY”
$strEnd = Read-Host “Enter end date DD-MM-YY (the day after to include a specific day) ”
write-host “Please wait”
write-host “Please wait.”
write-host “Please wait..”
write-host “Please wait…”
write-host “Please wait….”
write-host “Please wait…..”
write-host “Search will depend on the number of logs that are viewed…”
Get-ExchangeServer | where {$_.isHubTransportServer -eq $true -or $_.isMailboxServer -eq $true} | Get-MessageTrackingLog -ResultSize Unlimited -EventID “RECEIVE” -Start $strStart -End $strEnd | where {$_.recipients -like “$strRecipient”} | Select-Object Timestamp,ServerHostname,ClientHostname,Source,EventId,Sender,@{Name=”Recipients”;Expression={$_.recipients}},MessageSubject | Sort-Object -Property Timestamp | export-csv “C:\temp\trackingresults.csv”
write-host “The file C:\TEMP\trackingresults.csv has been created.”
start-sleep 5
- 微软将推出卫星解决方案:可连接到 Azure 云服务 - 2020年9月17日
- Windows Terminal 1.0正式发布 - 2020年5月25日
- Azure Lighthouse 相关介绍 - 2020年3月2日
还没有评论