Wipe Microsoft 365 Mailbox After License Removal Print

  • Administration, Mailbox, PowerShell, 365, Exchange
  • 0

IMPORTANT WARNING:
This process permanently deletes all mailbox data and is NOT recoverable.

Ensure all required data is backed up prior to proceeding using eDiscovery or export tools.

Overview

To fully wipe a Microsoft 365 mailbox without deleting the user account, you must:

  • Remove the Exchange Online license
  • Permanently clear the mailbox using PowerShell
  • Reassign the license to provision a new, empty mailbox

Prerequisites

  • Microsoft 365 Administrator access
  • Ability to connect to Exchange Online PowerShell

Step 1 - Remove Exchange Online License

  1. Go to the Microsoft 365 Admin Center
  2. Navigate to Users > Active users
  3. Select the user
  4. Open the Licenses and Apps tab
  5. Uncheck:
    • Exchange Online Plan 1 or Plan 2
    • Any other Exchange related licenses
  6. Click Save

This will soft-delete the mailbox. It remains recoverable for approximately 30 days unless permanently cleared.

Step 2 - Connect to Exchange Online PowerShell

Open PowerShell as Administrator and run:

Connect-ExchangeOnline

Step 3 - Permanently Clear Mailbox Data

Run the following command:

Set-User -Identity "<UserPrincipalName>" -PermanentlyClearPreviousMailboxInfo
  • Type Y and press Enter when prompted

This immediately and permanently deletes the mailbox data while leaving the user account intact.

Step 4 - Verify Mailbox Removal (Optional)

Run:

Get-User <Identity> | fl *Workload*

Confirm mailbox-related attributes are empty or null.

Step 5 - Reassign Exchange Online License

  1. Return to Microsoft 365 Admin Center
  2. Go to Users > Active users
  3. Select the user
  4. Open Licenses and Apps
  5. Re-enable Exchange Online Plan
  6. Click Save

A brand new, empty mailbox will be created for the user.

Notes

  • The mailbox removal may take a few minutes to fully process
  • The user account and other services like OneDrive and Teams are not affected
  • This is the recommended method when a full mailbox reset is required without deleting the user

Was this answer helpful?

« Back