In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Every Exchange administrator will encounter the need to monitor the daily mail queue: how many emails are sent, how many emails are received, and how many emails are blocked by policies and anti-spam. However, it is inconvenient to display every query in the Exchange Management Shell window. In order to better monitor the delivered emails every day, here is a script for mail delivery report.
#Add Exchange Snap-in
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
#Define administrative credentials
$Password = "12345678" | ConvertTo-SecureString -asPlainText -Force
$Username = "Domain\User"
$Credential = New-Object System.Management.Automation.PSCredential($username,$password)
#Define generated CSV path
$File = "C:\Scripts\Exchange\$(Get-Date -Format 'yyyy-MM-dd').csv"
#Filter delivery logs from 0:00 the day before to 0:00 today and store them in the Deliver variable
$Deliver = Get-MailboxServer | Get-MessageTrackingLog -Start (Get-Date).Date.AddDays(-1) -End (Get-Date).Date -EventId Deliver -ResultSize unlimited
#Select specific attributes and sort by topic and output to CSV
$Deliver | Select-Object Source,Sender,{$_.Recipients},MessageSubject | Sort-Object MessageSubject -Descending | Export-Csv -Path $File -NoClobber -NoTypeInformation -Encoding UTF8
#Send Mail Reports
Send-MailMessage -From User@domain.com -To User2@domain.com -SmtpServer mail.domain.com -Credential $Credential -Subject "Exchange Daily Tracking Log" -Attachments $File
#Remove CSV files
Remove-Item $File
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.