Quantcast
Channel: Symantec Connect - ブログエントリ
Viewing all articles
Browse latest Browse all 5094

Clearing out deleted mailboxes

$
0
0

I've been doing a lot of testing just recently with Exchange 2010 (and Archive Shuttle and Enterprise Vault).  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:

1.png

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

2.png

But, check here in the management console:

3.png

So now fromthe 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:

4.png

Happy :)


Viewing all articles
Browse latest Browse all 5094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>