Script to delete mails with subject "test mail" in office 365 from sender

Welcome Forums General PowerShell Q&A Script to delete mails with subject "test mail" in office 365 from sender

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
1 month, 2 weeks ago.

  • Author
    Posts
  • #114115

    Participant
    Points: 0
    Rank: Member

    Can someone help to delete mails from office365 mailboxes which have specific subject, sender, and from date.

    I tried below methods to display emails but didn't work

    Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'Subject:"test mail"'

    Thanks in Advance

  • #119296

    Participant
    Points: 814
    Helping Hand
    Rank: Major Contributor

    Did you check this documentation about deleting emails ?

You must be logged in to reply to this topic.