Skip to content

Instantly share code, notes, and snippets.

@chadmando
Created February 23, 2022 17:04
Show Gist options
  • Save chadmando/83dcf16f352f6dc8a7686a492d6902f8 to your computer and use it in GitHub Desktop.
Save chadmando/83dcf16f352f6dc8a7686a492d6902f8 to your computer and use it in GitHub Desktop.
Find all quarantined messages from the last week for all users. Results are grouped by users to make finding messages for specific users easier.
# Must be connected to Exchange Online
# Gets all Quarantined messages from the last week
# Results are grouped by recipient
Get-MessageTrace -EndDate (Get-Date) -StartDate (Get-Date).adddays(-7) -Status Quarantined |
Sort-Object -Property RecipientAddress |
Format-Table -GroupBy RecipientAddress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment