• Facebook
  • RSS Feed
  • Instagram
  • LinkedIn
  • Twitter
Jul 242013
 

file1441299721519I’ve been doing a lot of testing just recently with Exchange 2010 (and Archive Shuttle).  One of the things that I have needed to do is to create hundreds of mailboxes, populate them with the data, do some testing, then delete all the mailboxes and actually get rid of them.

In Exchange 2010 deleted mailboxes are not quite gone.  There are a couple of extra steps which are needed.  Let’s see:

Firstly, my Exchange Management Console looks a bit like this:

2013-07-24_16h27_35

But I want them all to be gone.  I can right click and choose ‘Remove’:

2013-07-24_16h27_06

But, check here in the management console:

2013-07-24_16h30_09

So now from the Exchange Management Shell I would run:

$mailboxes = Get-ExchangeServer | Where-Object {$_.IsMailboxServer –eq $true} | ForEach-Object { Get-MailboxStatistics –Server $_.Name | Where-Object {$_.DisconnectDate –notlike ‘’}} | select displayname, mailboxguid, database

Followed by:

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

And now back in the Exchange Management Console it looks like this:

2013-07-24_16h36_50

Happy 🙂

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)