Exchange mailbox cleanup

The joys of mailbox cleanup!

Here's a step-by-step guide to help you exchange mailbox cleanup:

Before you start:

  1. Backup your mailbox: Before making any changes, make sure to backup your mailbox to prevent any data loss.
  2. Check your mailbox size: Verify the size of your mailbox to ensure you have enough space to store your emails.

Exchange Mailbox Cleanup Steps:

  1. Connect to your Exchange server: Use the Exchange Management Console or the Exchange Online PowerShell to connect to your Exchange server.

  2. Run the Get-Mailbox cmdlet: Run the following command to retrieve a list of mailboxes:

    Get-Mailbox -ResultSize Unlimited

    This will display a list of all mailboxes in your organization.

  3. Filter mailboxes by size: Use the Get-Mailbox cmdlet with the -ResultSize parameter to filter mailboxes by size. For example, to retrieve mailboxes larger than 1 GB:

    Get-Mailbox -ResultSize Unlimited -Filter {TotalItemSize -gt 1GB}

    This will display a list of mailboxes larger than 1 GB.

  4. Run the Search-Mailbox cmdlet: Use the Search-Mailbox cmdlet to search for emails in the selected mailboxes. For example, to search for emails older than 6 months:

    Search-Mailbox -Identity <MailboxName> -SearchQuery "Received:<6 months ago" -DeleteContent

    Replace <MailboxName> with the actual mailbox name.

  5. Delete unnecessary emails: Use the Search-Mailbox cmdlet with the -DeleteContent parameter to delete unnecessary emails. For example:

    Search-Mailbox -Identity <MailboxName> -SearchQuery "Received:<6 months ago" -DeleteContent

    This will delete emails older than 6 months from the selected mailbox.

  6. Run the Get-Mailbox cmdlet again: Run the Get-Mailbox cmdlet to verify that the mailbox size has decreased.

Additional Tips:

By following these steps, you should be able to exchange mailbox cleanup and free up valuable storage space in your Exchange server.