I think important to mention the impacts of In-Place Hold. You must first remove any holds before complete this procedure. I found that if you have a mailbox hold the mailbox will not be soft deleted and the Set-User -PermanentlyClearPreviousMailboxInfo CMDlet will fail with "A parameter cannot be found that matches parameter name 'PermanentlyClearPreviousMailboxInfo'"which is not so intuitive.
Procedure as I see it:
- Backup data in mailbox! if you need it...
- Remove all Hold's from the mailbox. Test by trying
- Disable-Mailbox <> -PermanentlyDisable
- In EXO this will provide you with the Inplace policy GUID and blackarts will guide you from there 😉 (See links below)
- Check DelayHoldApplied
Get-Mailbox <> |fl compl*,delay*,inplace*
These values should be set to false if not Set-Mailbox -Identity <> -RemoveDelayHoldApplied
- Remove the user's license.
- Run Get-User RecipientType should -eq MailUser not Usermailbox
- Run Set-User -PermanentlyClearPreviousMailboxInfo.
- Add the user's license.
If your at this point... Good luck!
JB
Other helps:
https://docs.microsoft.com/en-us/microsoft-365/compliance/identify-a-hold-on-an-exchange-online-mailbox?view=o365-worldwide
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_exchon-mso_o365b/exchange-cant-disable-this-mailbox-because-it-is/44ce9f30-7683-4c67-b52c-b7658cdce0ec