Locating disconnected mailbox

Hi

Running Exchange 2007 server. We have servers in EMEA, APAC and US; servers are prefixed with their region names (e.g. emeambx1). Sometimes, our Helpdesk accidentally delete AD accounts and the mailbox is in disconnected state and I need to find it.

We have five Exchange 2007 mailbox servers per region, so finding the disconnected is work intensive at the moment.

As an example, I need to find a disconnected mailbox in EMEA. I think we need to run clean-mailbox on the servers first? Is this true? Is there any 'outage' associated with this, or is it purely related seeing disconnected mailboxes only?

Therefore, my questions are:

1. I need to run clean mailbox on all the EMEA servers only
2. I then need to find a disconnected mailbox with the display name "John Smith" which is on an EMEA server

Does anyone know the Powershell I'd run to find that?
LVL 3
kam_ukAsked:
Who is Participating?
 
AkhaterCommented:
$servers = Get-MailboxServer | ? {$_.name -like "EMEA&*"}
$servers | Get-Mailboxstatistics -Server $_.name | ?{ $_.DisconnectDate -ne $null -and  DisplayName -eq "John Smith"} | fl DisplayName,Database,DisconnectDate
0
 
Felix LevenSenior System and DatabaseadministratorCommented:
this shows disconnected mailboxes:
Get-MailboxStatistics -Server | where { $_.DisconnectDate -ne $null } | select DisplayName,DisconnectDate
0
 
kam_ukAuthor Commented:
I need to find the disconnected mailbox with display name "John Smith", i.e need to know what server it's on. Running the command above will just give me all the disconnected mailboxes, which is not what I'm after?
0
 
Felix LevenSenior System and DatabaseadministratorCommented:
Get-MailboxStatistics -Server | where { $_.DisconnectDate -ne $null and DisplayName -eq John Smith  } | select DisplayName,DisconnectDate
0
 
Felix LevenSenior System and DatabaseadministratorCommented:
-and
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.