Managing your organization's Exchange server can be time-consuming. Microsoft's extension to the command-line system, called PowerShell, offers IT professionals and enthusiasts a quick and scriptable means to manage an Exchange server. When removing a mailbox from your Exchange server, a single PowerShell commandlet can be used to accomplish your task.
Things You'll Need
- Network or local access to the Exchange server
- Windows PowerShell from Microsoft
Open a command prompt on the Exchange machine.
On Windows XP or Windows 2003, press start, select Run, and enter \"cmd\".
On Windows Vista, Windows 7, or Windows 2008, press start, and enter \"cmd\" in the search box. Then press Enter.
Decide how you want to remove this mailbox.
Exchange offers you two options for mailbox removal. Either you can disconnect the mailbox from the user account and save the message data, or you can disconnect the mailbox and completely erase it.
Identify the user to be removed.
The \"Identity\" parameter is how you will locate the user in your PowerShell command. You can specify the identity in many obscure ways; however, for most users the following two will be the most useful:
Disconnect the mailbox, and optionally delete it.
Enter the following command into the command prompt to remove the account and save the mailbox data.
Where it says DOMAIN\ACCOUNTNAME, you may enter the Domain, a backslash, and the name of the user's account on the machine. If you wish, you can simply enter the email address in its place after the -Identity parameter.
Remove-Mailbox -Identity DOMAIN\ACCOUNTNAME
If you wish to instantly delete the contents of the mailbox, run the following command:
Remove-Mailbox -Identity DOMAIN\ACCOUNTNAME -Permanent $true