Delete Sync'd Mailbox only.

Iron Contributor

Hey Guys,

 

We would like to delete a users mailbox which is associated with his Sync'd object in (ADConnect).

 

1) User sync'd with AD Connect

2) User licensed with E3

3) USer needs a completely new mailnox, DOES NOT want to remove his existing user account as its used for 85 other things and removing and re-syncing it is not an option.

 

Here is what we did on a test user:

 

1) Unlicensed the test users account, by just unchecking the "Exchange Online Plan 2" option.

2) Ran Disable-RemoteMailbox "username" -archive

3) Ran ADCOnnect Sync

4) Ran Disable-RemoteMailbox "username"

 

Everything went as expected, we are now unable to see the users mailbox, however we are also unable to see a SoftDeleted Mailbox for the user. 30 days? these actions were all performed by me today all test mailboxes were working prior to my running the commands above.

 

AM i correct that if you run Disable-RemoteMailbox you will permanently delete a users mailbox immediately, and it will not be recoverable.

 

https://docs.microsoft.com/en-us/exchange/recipients-in-exchange-online/delete-or-restore-mailboxes << doesnt mention that.

https://docs.microsoft.com/en-us/powershell/module/exchange/federation-and-hybrid/disable-remotemail... << also doesn't mention that.

 

Thanks,

 

Robert

 

 

 

 

 

3 Replies

That's basically caused by your first step, removing the license. Here's a quote from a recent article on the subject:

 

For example, one of the more common methods in the past was to disconnect the Exchange Online mailbox by removing the license, migrate the on-premises mailbox, then perform a restore (New-MailboxRestoreRequest) of the previous Exchange Online mailbox into the newly migrated mailbox. The main reason that we do not suggest this as a recovery method is that recovery from Exchange Online disconnected mailboxes cannot always be guaranteed (there can be factors like passing of time etc. which can make the process not be successful). If 99% of the time, it will work flawlessly, but that 1% of the time it doesn’t work, we do not suggest it because you might lose data as a result.


In any case, if you need the data preserved, make a backup copy to a PST file.

@Vasil Michev 

 

Thanks as always. I am going to take a look at this again and make sure i really get it.. I Was expecting to ALWAYS be able to see a deleted mailbox in the "SoftDeleted" state when you removed a license and/or when you ran the disable-remotemailbox command. 

 

 

Those are two different operations, the important thing to note is that removing the license comes with somewhat shady guarantee of reversal, as well as renders the mailbox transparent to eDiscovery activities. See for example https://docs.microsoft.com/en-us/microsoft-365/compliance/content-search#searching-disconnected-or-d...