xPM – (eXchange Purge Mailboxes) for Exchange 2010 SP 1 and above…

by Andy Grogan on June 17, 2012 · 4 comments

in Exchange 2010 (Admin), Exchange 2010 (General), Exchange 2010 (Mailbox), Exchange Programming .NET, Mailbox Databases, Powershell

Many of you will be aware that if you wish to clear down Disconnected or Soft deleted mailboxes in bulk from Mailbox Databases on Exchange 2010 SP1 and above you can use the following Powershell command(s):

$Mailboxes = Get-MailboxStatistics -Database “<DBName>” | where-object { $_.DisconnectDate -ne $null }

$Mailboxes | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }

However there is no GUI interface within the Exchange Management Console to perform this task, nor is it straight forward to purge mailboxes individually (like you could in Exchange 2003) from the Exchange Management Shell. So, I decided to break out my copy of Visual Studio to put together an application that provides a GUI overlay to the process of purging single mailboxes from a database ~ which I have affectionately named the xPM.

Prerequisites

Before downloading and running the tool you should ensure that you host machine meets the following requirements:

  • The tool should be executed from a machine with the Exchange 2010 Management Tools (Service Pack 1 and above) – the tool is not supported against the RTM
  • .NET Framework 3.5 and above

Download

You can download the xPM to your Exchange 2010 management machine from the link below:

xpmIcon [ xPM (eXchange Purge Mailboxes Tool – Version 1.0 – 324KB ]

Installation

The xPM is supplied as a simple Self Extracting archive.

When you have downloaded it to your machine – follow the on-screen prompts which will place the single product binary into a folder in the root of your c:\ drive (c:\xPM).

Tool usage

When you execute the xPM you will be presented with the screen shown in the screenshot below – click on the “Refresh” button to retrieve a list of all your Mailbox Databases:

xmpMainBlank

Selecting a mailbox database will populate the “Disconnected Mailboxes” area (if there are any disconnected mailboxes which can be purged from that store) – see below:

xmpMainGetDBSelDB

Select the mailbox that you would like to remove permanently and then click on the “Purge” button – see below

xmpMainGetDBSelDB2

That’s all there is to it! I hope that you like the tool and find it useful.

{ 4 comments… read them below or add one }

BStear June 20, 2012 at 12:06 pm

Great idea!

Tried it, I get an error on Win Server 2003 32-bit:

“The image file c:\xMP\xPM.exe is valid, but it is for a machine type other than the current machine.”

Reply

Andy Grogan July 9, 2012 at 5:34 pm

Just for information folks, The xpm is only supported with Exchange 2010 SP1 and above on an x64 O/S as it is a 64 bit image and uses some native Exchange 2010 SP1 cmdlets.

Reply

thebakersman September 4, 2012 at 9:47 am

Andy

Why does the App sometimes seem “HUNG” its very slow? what can cause this?

Regards

Paul

Reply

Andy Grogan September 4, 2012 at 4:09 pm

Hiya Paul,

This can be caused by a few things

1. If you have a large number of mailbox databases and are executing remotely (on a workstation to an Exchange Server over a WAN link) 2. If you have a large number of disconnected mailboxes within a store and are executing remotely (on a workstation to an Exchange Server over a WAN link) 3. Execution within large infrastructures

If the above does not match your setup – please let me know, Cheers A

Reply

Leave a Comment

*

Previous post:

Next post: