How to remove user mailboxes from Exchange Server

This article explains how to use PowerShell to delete mailboxes from Exchange Server and also ADManager Plus, an integrated web-based Active Directory, Office 365 and Exchange management and reporting solution. It also shows using ADManager Plus will be the easiest way to delete Exchange Server mailboxes.

Windows PowerShell

Steps to use PowerShell to delete Exchange server mailbox.

  • Ensure you have the necessary permissions to delete the mailbox.
  • Get the name of the user account to which this mailbox belongs, and also decide if you wish to delete the mailbox permanently right away.
  • Create the script with these values.
  • Execute the script in the PowerShell window.

A sample script to delete mailbox from Exchange Server using PowerShell

 Copied
Remove-Mailbox -Identity "John Smith"
Click to copy entire script

ADManager Plus

To delete an Exchange Server mailbox

  • Launch the Disable/Delete User Mailbox feature located in the Exchange Tasks under User Management in Management tab.
  • Select the relevant Exchange Server and mailbox, enter the names of the users whose mailboxes you wish to delete or fetch the list from a CSV file, and click Apply.
  • You can use the same feature for single and also bulk mailbox deletion.

Screenshot

Delete User Mailbox in Exchange server using Admanager Plus

» Start 30-day Free Trial

The script mentioned above shows how you can use PowerShell to delete mailbox in Exchange Server. Note: You cannot use the same script to remove distribution groups from CSV in bulk.

Limitations of using PowerShell to Remove an Exchange Server mailbox.

  • To delete mailbox from Exchange Server, you must have the necessary permissions. With ADManager Plus, users privileges in native AD or Exchange doesn't have to be elevated, and they can be allowed to do this operation only in specific OUs or domains.
  • To user PowerShell to bulk remove mailbox from Exchange Server, the script has to be modified or a new script has to be created. With ADManager Plus though, it is offered as a built-in option that's available by default.
  • You must know how to run the scripts from the PowerShell window or command line. ADManager Plus is purely GUI-based, allowing you to perform all management and reporting actions with just mouse clicks from its web-based console.
  • Even a misplaced hyphen, a typo in the LDAP names or lack of sufficient permissions will lead to errors. As all actions in ADManager Plus are GUI-driven, there is no need to write scripts, eliminating the chances of errors.

Single-window mailbox management for Exchange and Office 365 with ADManager Plus.

  Get 30-day free trial.
  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  •  
     
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link