Locate disconnected mailbox in Exchange
Sometimes our support teams accidentally delete the wrong AD account when users leave our company and their mailboxes are set to a 'disconnected' state within our Exchange 2007 environment.
In order to find them again, we need to locate the disconnected mailbox from Exchange. This has two issues:
1. We need to run the 'clean-mailboxdatabase' command to update the names of disconnected mailboxes in a particular db
2. We can only search by each mailbox db in turn
I would like to do the following
a) Run a command that would run clean-mailboxdatabase on all US Exchange servers
b) Run a command that would 'get' all disconnected mailboxes on US Exchange databases
Our Exchange servers are named in the format, region-mbx1, e.g. US-Mbx1, EMEA-Mbx1, APAC-Mbx1.
Does anyone know how I can do this?
Secondly, is there a disadvantage to running clean-mailbox on all databases on a given server at the same time?
April 13th, 2011 3:19pm
I only have 1 server in my lab and I haven't tested this much so I *highly* recommend testing this in your lab if you have more servers and databases and/or having someone else look at it.
Get-MailboxServer | where-object {$_.Name -like "US-*"}
foreach ($server in $servers)
{
get-mailboxdatabase -server $server | clean-mailboxdatabase
}
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 6:10pm
er first line should be
$servers = Get-MailboxServer | where-object {$_.Name -like "US-*"}
April 13th, 2011 6:12pm
To answer your question, the Clean-MailboxDatabase cmdlet only scans the Active Directory Directory service for disconnected mailboxes that are not yet marked as
disconnected in the Microsoft Exchange store and update the status of those mailboxes in the Exchange store. This cmdlet is not able to update the Exchange store unless the Microsoft Exchange Information Store service is running and the database is mounted.
I don’t think there is any disadvantage to run the command on all databases.
Thanks.
NovakPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
April 18th, 2011 11:10pm