Keep Deleted Mailboxes
Hi,
Recently i deleted around 400 disabled mailbox in the exchange 2007 mailbox server. After deletion all the deletd mailboxes appeared in the disconnected Mailbox. I modified settings to keep deleted mailbox for 10 from 30 days. Wanted to purge this mailboxes asap and get some white spaces.
My Exchagne database are around 100+GB. Wanted to delete unused mailbox so that i get some white space and wanted exchagne to use some of the white spaces created with inthe database. This should reduce the growth of the db size to some extent.
Its been more than 20 days and deleted maiboxs are not purged from disconnected mailbox. I can clean the disconnected mailbox throught powershell immediately but i dont want to do that. I wanted exchange itself cleans the mailbox which are in disconnected state from more then 10 days.
Not sure if modifiying "Keep Deleted Mailboxes" required restart of exchange services.
Did not try as it production server.
Any thoughts ?
Regards,
Krishna
http://smtpport25.wordpress.com
June 21st, 2009 6:15pm
HI,
I understood you want to purge all disconnected mailboxes at one time. Run below command on EMS.
$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid
Then run
$users | ForEach { Remove-Mailbox -Database "Database name" -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }
Regards
Chinthaka
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2009 8:18pm
Hi Chinthaka,
Thanks for the reply.
I really dont not want to manually clean up the disconnected mailbox throught powershell. I wanted to do this as part of dialy online manintenace to clean up this things. Thats the reason i reduced deleted mailbox retention to 10 days.
I have Exchagne 2003 server as well and i enabled this setting on both Exchagne 2003 and Exchagne 2007 Mailbox server. Exchange 2003 BE server has purged all the disconnceted mailbox which are older then 10 days but Exchagne 2007 did not do so. Not sure on this
Thanks for the powershell command. I had posted similar command in my blog.
http://smtpport25.wordpress.com/2009/06/09/deleting-disconnected-mailboxes-from-exchange-2007/
Regards,
Krishna
http://smtpport25.wordpress.com
June 21st, 2009 9:11pm