Knowledgebase
emscom > emscom Help Desk > Knowledgebase

Search help:


Exchange - Recreate active user mailbox

Solution

Requirement

Reset an Exchange mailbox to default deleting all existing content without deleting the active user account and other Microosft cloud content associated with the user account

Issue

  • There is no one-click method to recreate or reset an Exchange user/recipient mailbox.
  • By default Exchange 'soft' deletes mailboxes.  The mailbox is disconnect from the user account but remains intact for at least the default 30 day retention period.
  • Attempting to recreate the mailbox within the retention period reinstates the softe deleted mailbox.

Resolution

  1. Remove the Exchange license from the Active user account.
  2. Use Powershell to hard delete the mailbox.
  3. Wait for Azure to synchronise.
  4. Reassign Exchange license to trigger mailbox recreation.

 

Start by removing ONLY the Exchange license from the Active User in the Microsoft 365 admin portal.

PWSH7

After removing the Exchange license, wait a few minutes and enter the following commands.

> connect Exchange-Online -UserPrincipalName administrator@contoso.com

> get-user "user.to.reset@contoso.com"

Name                                 PreviousRecipientTypeDetails RecipientType RecipientTypeDetails
----                                 ---------------------------- ------------- --------------------
03e95a20-3652-4895-af25-6deed0856081 UserMailbox                  MailUser      MailUser

Note: PreviousRecipientTypeDetail changes from None when the license has been removed.

> get-mailbox "user.to.reset@contoso.com"

Get-Mailbox: Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object
'richard.grant@exoip.com' couldn't be found

Note: get-mailbox fails when the mailbox has been soft deleted

WARNING: The following command triggers immediate and permanent deletion of mailbox content!

> set-user "user.to.reset@contoso.com" -PermanentlyClearPreviousMailboxInfo

Confirm
Are you sure you want to perform this action?
Delete all existing information about user Identity:'user.to.reset@contoso.com'?. This operation will clear existing values from Previous home MDB and Previous Mailbox GUID of the    
user. After deletion, reconnecting to the previous mailbox that existed in the cloud will not be possible and any content it had will be unrecoverable PERMANENTLY. This operation   
will also create an async task to purge all the mail data. You can check the status by running 'Get-User <Identity> | fl *Workload*' and check if DesiredMailboxWorkloads is set to  
null. Do you want to continue? Y

NOTE: The mailbox cane

NOTE: It may take up to 8 hours for the Exchange server to synchronise and delete the content.

Monitor status of the user until value return null

> get-user "user.to.reset@contoso.com" | fl *WorkLoad*

Mailbox is waiting to be deleted

MailboxWorkloads                   : Mail, Calendar, Contacts, Substrate
DefaultMailboxWorkloadsMask        : Mail, Calendar, Contacts, Substrate
DesiredMailboxWorkloads            : Substrate
DesiredMailboxWorkloadsModified    : 18/04/2024 11:20:20
DesiredMailboxWorkloadsGracePeriod : None

 

Mailbox has been deleted

MailboxWorkloads                   : Mail, Calendar, Contacts, Substrate
DefaultMailboxWorkloadsMask        : Mail, Calendar, Contacts, Substrate
DesiredMailboxWorkloads            : 
DesiredMailboxWorkloadsModified    : 
DesiredMailboxWorkloadsGracePeriod : 

 

 

Finally.  Reassign an Exchange license to the Active User in the Microsoft 365 admin portal.

 

 

 

 
Was this article helpful? yes / no
Related articles Exchange - Shared Mailbox Access (macmail)
Exchange - Shared Mailbox Access (not Mac mail)
Exchange - Shared mailbox on secondary domain
Webmail access
Shared Mailbox Deleted Items saved to user folder
Article details
Article ID: 227
Category: Exchange
Date added: 07-05-2024 14:35:19
Views: 433
Rating (Votes): Article not rated yet (0)

 
« Go back

 
Powered by Help Desk Software HESK, in partnership with SysAid Technologies