Create and Delete Mailbox Users using Exchange Management Shell

There are a lot of reasons to delete mailboxes from an Exchange Server. One of them is when a employee leaves the organization or to cleanup the Exchange database. In this article I’ll will show you how to create and delete Exchange 2016 users in a on-premise environment using the Exchange Management Shell.

Create new Mailbox AD User

In the example below I use the Exchange Management PowerShell to create new mailbox AD user. The following command creates the Active Directory user “Eruza Xinul” in the Users OU, with a mailbox in the EXDB01 database.

Enable Mailbox for existing AD User

Remove Mailbox

Before you start deleting mailboxes, make sure you have sufficient permissions. To run the Remove-Mailbox cmdlet, you need to have the Mail Recipient Creation role assigned. By default, only members of Organization Management and Recipient Management role groups have sufficient privileges. To delete a mailbox, run the following cmdlet:

Note: in Exchange Server 2016 you can add the -Permanent:$true parameter to skip the soft-deletion phase.

Keep in mind that using the cmdlet from above soft-deletes the mailbox. Soft-deletion means that the mailbox is marked for purging and will be permanently deleted as soon as the mailbox deletion retention period passes. The default retention period is 30 days. To check the retention period in your organization, run the following cmdlet:

I really like to hear what you have to say about this article:

  • Was this article helpful for you or do you have any questions?
  • Do you have additions, suggestions or any other ideas?
  • Just let me know by leaving a comment below.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon!

About Lex van der Horst 201 Articles

Be the first to comment

Leave a Reply