【问题标题】:Get-MessageTrace Need a Powershell command to show inbound mail to 1 mailbox grouped by date Exchange OnlineGet-MessageTrace 需要一个 Powershell 命令来显示入站邮件到按日期分组的 1 个邮箱 Exchange Online
【发布时间】:2018-08-29 17:21:55
【问题描述】:
我想我将使用 Get-MessageTrace,但我需要显示 1 个邮箱的入站邮件,按日期分组。这是针对 Exchange 365 的。
Date Count
____ ____
8/22/2018 45
8/23/2018 15
8/24/2018 22
【问题讨论】:
标签:
powershell
office365
exchange-server
office365api
【解决方案1】:
您可以使用 Powershell 查看特定电子邮件帐户在特定日期期间收到的电子邮件数量。
请尝试以下代码:
$creds = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.outlook.com/powershell" -Credential $creds -Authentication Basic -AllowRedirection
$messages = Get-MessageTrace -RecipientAddress address@example.com -StartDate (Get-Date).AddDays(-1) -EndDate (Get-Date)
$messages.Count
欲了解更多信息,请查看以下链接:Office 365 mailbox recieved mail count