May 22 2020 05:56 PM
Here's what I'd like to do:
Here's what I've tried:
I'm starting to think what I want to do is simply not possible, but I thought I'd fish for some fresh ideas since I'm out of them. One thought I had was to purge the deleted mailbox before the 30-day retention period is up, but I don't see a way to get a handle to it. Attempt to use Get-Mailbox with -IncludeInactiveMailbox and -SoftDeletedMailbox haven't located the mailbox for me.
May 23 2020 03:47 AM
Hi, you should be able to achieve this by purging the Deleted Users folder as you have indicated. To do this, connect to Powershell as follows;
Connect-MsolService
Get-MsolUser -MaxResults 60 -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin -Force
When recreating and licensing the user, you will now have a nice blank mailbox.
May 23 2020 07:36 AM
May 23 2020 08:02 AM
May 23 2020 11:33 AM
I'm afraid you may be right. That leaves me with a user whose other cloud content is removed, which is bad in my case.
May 23 2020 11:37 AM
May 23 2020 11:46 AM
It's often the case in migration scenarios that users are provisioned in the service before their mail is migrated, so they start using things like OneDrive and SharePoint long before the mail switch. Migration testing may push data into the service mailbox that we want to purge before the actual migration. Recreating the user would mean the user loses all of their accumulated non-mail data.
May 23 2020 12:17 PM
Solution
OK, maybe a little fiddly and messy, but how about enabling the Online Archive for the mailboxes in this situation and then create a new Exchange Retention Policy In the Exchange Admin Center to move content to the archive which is older than 14 days (along the lines of the below). Assign this new retention policy only to the users who's mailboxes you want to clear out.
Once the move to archive has completed, disable the Online Archive for that user (making sure that you don't re-enable it for at least 30 days or the content will return). Then, make sure you assign the default retention policy back to that user.
You'd have to be very diligent about assigning this temporary policy. It could just as easily get you into trouble if assigned incorrectly. If you plan to give it a try, test it to the hilt first I would say.
May 05 2021 03:36 PM
Jun 27 2023 10:50 AM
I know this is an older post but I faced the same challenge and came across this ExO command that will achieve the desired result. Unfortunately, have been subject to this in the past and executed a permanent deletion of the account, recreate to correct the issue and then restore the content. I am so glad to come across this! I hope it referenced here will help others too.
John
Jul 11 2023 01:19 AM
@John Caldera which ExO command? You linked back to this same post. Did you mean to send a different link?