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
How to Delete Outlook Email in Powershell
PowerShell is a built-in tool of most Windows computers that allows you to run commands to write, debug and modify scripts. Entering...
How to Remove a Outlook Profile With Powershell
The Windows Powershell utility provides administrators with an advanced set of commands used to add, edit and delete profiles on a Windows...
How to Uninstall Powershell
Powershell is a Microsoft Windows script language and command line shell that is used to automate the administration of applications on the...
How to Delete & Recreate an Exchange Mailbox
You can delete and recreate a Microsoft Exchange 2003 mailbox through Exchange System Manager or from Active Directory's Exchange Management console. This...
How to Enable an Exchange Mailbox
Microsoft Exchange Server is the primary email server technology deployed by the Microsoft Corporation. The Exchange system allows system administrators to provide...
How to Delete Contacts in PowerShell
The Windows PowerShell is used to execute text-based commands for Windows and Microsoft programs. The main PowerShell window looks like a DOS...
How to Reset a PowerShell Password in Exchange
PowerShell is a command-line interface that is integrated with .NET framework. You may use PowerShell to perform various administrative tasks on your...
How to Delete All of the Files in a Folder on Powershell
Windows PowerShell is a scripting language built by Microsoft. PowerShell is available on all Windows Operating systems since XP. PowerShell provides access...