Remove Shared Mailbox from Exchange 2013 Using PowerShell Commands

Shini Mohan | Modified: October 14, 2024 | Exchange Server 2013, General Info | 4 Minutes Reading

This article is based on how to remove shared mailbox from Exchange 2013 using PowerShell Commands. As might know Shared mailboxes are specifically used by specific groups and it has multiple users, who can receive, read, and send emails. A shared mailbox has a single generic email address info@geoscience.com, to provide a centralized way for users to read, send, and receive emails. Remove Shared Mailbox from Exchange 2013

Whenever a user sends an email from a shared mailbox, the mail will appear to be sent from shared mailbox, not from the mailbox of the individual user. The permission for accessing the shared mailbox is controlled by the Exchange admin. Shared mailbox offers are best suited for departments such as customer service, help desk, human resources, and printing service.

Remove Shared Mailbox from Exchange 2013 With PowerShell

Before discussing the method of removing shared mailboxes, firstly we will discuss about the concept of Automapping.
Automapping is a feature that was introduced in MS Outlook 2010 that will automatically map to the mailbox for which a user has full access. In addition, Autodiscover allows additional mailboxes for which the user has full access permission to be automatically opened in the Outlook client.
The Autodiscover will automatically load all the mailboxes to which the user has full access in the following cases:

  • If the user has full access to a shared mailbox
  • If the admin allows full access for a user to access another user’s mailbox

with benefits, Automapping also has its disadvantages as it gives full access to other’s mailboxes, therefore admin can also remove this permission with the help of the PowerShell cmdlet.

Understand the Remove-Mailbox Command

You need to make use of the Remove-Mailbox command. Below is the breakdown of all the different parameters you may use in the process.

-Identity: With this, you specify the name of the Shared Mailbox you intend to remove, there is no filtering parameter. So this here servers as the sole means of deciding which mailbox will be deleted.
-Permanent: A powerful parameter that bypasses the default soft deletion roadmap and directly parma deletes the shared mailbox from the Exchange Server.
-Force: Use this if you want to fastrack the deletion process, by skipping over the permission requests.
-IgnoreLegalHold: This is another parameter that bypasses any legal hold considerations.
-WhatIf: Admins can append this at the end of their command to simulate what would happen when they delete the shared mailbox without actually deleting it.

Process for Removing Shared Mailboxes

Start by launching an instance of Exchange Management Shell.

Note if you use the regular PowerShell you have to first lin the Exchange account. Once done simply use the following.

Remove-MailboxPermission cmdlet enables the admin to remove permission from the user’s mailbox Remove Shared Mailbox from Exchange 2013
This will remove user A2’s access rights to A1’s mailbox.

Permission - Remove Shared Mailbox from Exchange 2013

with the help of the above given Powershell cmdlet, one can avoid the situation when mailboxes automapping error.

Decide whether or not you have to export the Exchange mailbox to PST with PowerShell

Conclusion

As we saw removing auto auto-mapped shared mailbox from the Exchange Server was not a really tough task. It was just work for the execution of some desired commands. Therefore at last we can conclude that the process of removing shared mailbox from Exchange 2013 by using commands running in Exchange Management Shell is really an interesting work.

Frequently Asked Questions on the Process of Deleting Shared Folders in Exchange Server 2013

How can I delete the Exchange Server Shared Folder without using PowerShell?

  • Log in to the on-premise Exchange Server
  • Under the Recipients section
  • Go to the shared tab.
  • There select the mailbox no longer required.
  • Then tap the dustbin icon.

Can I restore a deleted shared mailbox using PowerShell?
Yes, you can restore a deleted shared mailbox using PowerShell. To do so, use the following command:
Get-Mailbox -SoftDeletedMailbox | Restore-Mailbox -Identity “SharedMailboxName”
This will restore the mailbox, provided it only went under soft-deletion and is within the retention period.

Do I need to keep the Shared Folder in the inactive state before deletion?
No, you don’t need to make a shared mailbox inactive before deletion. Although it is a best practice to first inform the users during an emergency removal admins can add a “-Force” parameter in their command and ignore all warnings, and active sessions.

What are the most common errors during the Exchange Server Shared Folder removal?
Some common errors when removing shared mailboxes include:

  • Mailbox is on Litigation Hold or In-Place Hold..
  • Mailbox is linking to an active user account in AD.
  • Insufficient permissions.
  • Soft-deleted mailbox already exists