Delete emails

Glenn Maxwell 11,496 Reputation points
2021-07-01T18:58:56.64+00:00

Hi All

i have a unified group and i want to delete all the emails of that unified group as the mailbox is full. the mailbox has thousands of email. i dont have retention tags for the unified groups. is it possible to delete it all the emails from exchange online PowerShell.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,578 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,669 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yuki Sun-MSFT 41,146 Reputation points Microsoft Vendor
    2021-07-02T03:05:43.377+00:00

    Hi @Glenn Maxwell ,

    In theory we can folllow the documention below to delete messages from a unified group using the Security & Compliance Center PowerShell:
    Search for and delete email messages
    But as indicated in the article above, a maximum of 10 items per mailbox can be removed at one time, because the capability to search for and remove messages is intended to be an incident-response tool pnly. So from my point of view, it's not a good option for your circumstance which needs to remove thousands of emails.

    That being said, creating a retention policy as you have mentioned would be a better way to clean up the unified group:

    1. Go to Policies > Retention:
      111211-1.png
    2. Clieck Retention Policies > New Retention Policy
      111193-2.png
    3. Specify the location, choose the group you would like the policy to apply to and finish the remaining steps:
      111194-3.png
    4. Wait for up to 1 day for the retention policy to be applied to the group.

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.