Get-MailDetailMalwareReport and Get-MailDetailSpamReport: Microsoft 365 malware and spam report
Cmdlet: Get-MailDetailMalwareReport
Description: This cmdlet retrieves messages that contain malware.
- Get-MailDetailMalwareReport
- [-Action <MultiValuedProperty>]
- [-Direction <MultiValuedProperty>]
- [-Domain <MultiValuedProperty>]
- [-EndDate<DateTime>]
- [-EventType <MultiValuedProperty>]
- [-Expression <Expression>]
- [-MalwareName <MultiValuedProperty>]
- [-MessageId <MultiValuedProperty>]
- [-MessageTraceId <MultiValuedProperty>]
- [-Page <Int32>]
- [-PageSize <Int32>]
- [-ProbeTag <String>]
- [-RecipientAddress <MultiValuedProperty>]
- [-SenderAddress <MultiValuedProperty>]
- [-StartDate <DateTime>]
- [<CommonParameters>]
Example 1:
1 Get-MailDetailMalwareReport -StartDate 06/13/2020 -EndDate 06/15/2020 -SenderAddress john@example.com
This script retrieves the details of messages sent by john@example.com that contained malware between June 13, 2020 and June 15, 2020.
Cmdlet: Get MailDetailSpamReport
Description: The cmdlet retrieves the details of spam messages in Exchange Online.
- Get-MailDetailSpamReport
- [-Action <MultiValuedProperty>]
- [-Direction <MultiValuedProperty>]
- [-Domain <MultiValuedProperty>]
- [-EndDate<DateTime>]
- [-EventType <MultiValuedProperty>]
- [-Expression <Expression>]
- [-MessageId <MultiValuedProperty>]
- [-MessageTraceId <MultiValuedProperty>]
- [-Page <Int32>]
- [-PageSize <Int32>]
- [-ProbeTag <String>]
- [-RecipientAddress <MultiValuedProperty>]
- [-SenderAddress <MultiValuedProperty>]
- [-StartDate <DateTime>]
- [<CommonParameters>]
Example 1:
1 Get-MailDetailSpamReport -StartDate 06/13/2020 -EndDate 06/15/2020 -SenderAddress john@example.com
This script retrieves the details of spam messages sent by john@example.com between June 13, 2020 and June 15, 2020.
Generate spam and malware reports with M365 Manager Plus
M365 Manager Plus offers built-in reports on Microsoft 365 that can be viewed in a single click. Below are some of the reports on spam and malware provided by M365 Manager Plus,
If the default audit profiles do not fit your needs, you can,
- Top Spam Recipients
- Top Malware Recipients
- Spam Traffic Summary
- Malware Detections
- Spam Detections.
Highlights of M365 Manager Plus:
- Advanced filters: Use attribute and condition-based filters to get the data you need without lengthy PowerShell scripts.
- Reports on historical data: PowerShell cmdlets can only retrieve data that's at least seven days old and no older than 180 days. But, M365 Manager Plus reports can fetch all data right from its installation.
- Customizable dashboard: M365 Manager Plus dashboard is customizable. Generate graphical reports to get a quick peek at the mail traffic summary, top email senders and receivers, client device usage, and more. This dashboard can be embedded in any of your web pages to enable constant monitoring.
- Report scheduler: Schedule report generation at regular intervals to reduce the overhead.
- Report export: The reports can be exported to PDF, XLSX, HTML, or CSV formats and redistributed via emails to the administrators.
- Secure delegation: Securely delegate report generation to technicians and IT staff without giving them full access to the Microsoft 365 Admin Center.