Forum Discussion
fstorer
Sep 06, 2021Brass Contributor
Removing shared mailboxes
Hello everyone, I have to remove several shared mailboxes from our tenant and I am going to do this via a PowerShell script. As you may know, every time you try to remove a mailbox using the "rem...
- Sep 07, 2021That's because you are using the -PermanentlyDelete switch. As the documentation says, this switch is used for removing soft-deleted mailboxes:
This switch works only on mailboxes that have already been deleted, but are still recoverable (known as soft-deleted mailboxes).
Simply do it like this:
Remove-Mailbox shared -Force
VasilMichev
Sep 07, 2021MVP
That's because you are using the -PermanentlyDelete switch. As the documentation says, this switch is used for removing soft-deleted mailboxes:
This switch works only on mailboxes that have already been deleted, but are still recoverable (known as soft-deleted mailboxes).
Simply do it like this:
Remove-Mailbox shared -Force
This switch works only on mailboxes that have already been deleted, but are still recoverable (known as soft-deleted mailboxes).
Simply do it like this:
Remove-Mailbox shared -Force
- fstorerSep 07, 2021Brass Contributor
Thank you VasilMichev!
What about the shared mailbox users in Azure? Do I always need to delete them first? Is there a quick way to delete them permanently in one step?
- VasilMichevSep 07, 2021MVPThe Remove-Mailbox cmdlet takes care of the user deletion as well.