Saturday, August 15, 2009

To find the disconnected mailbox in the mailbox servers.

This script can be used to find the disconnected mailbox in your exhange organisation by just giving display name as input. This will be helpful if you have many mailbox servers in your org. The below script has been tested and works fine.

###################################################

Write-Host
$search = read-host "Type part of DisplayName Ex Tom* *sson *middle* , searching mailbox servers one by one... "

Write-Host
Write "Press ctrl-C to stop search once you found your mailbox"

$exchangeservers = Get-ExchangeServer where-object {$_.admindisplayversion.major -eq 8 -and $_.IsMailboxServer -eq $true }

foreach ($server in $exchangeservers)
{

Write-Host
Write "Searching $server"

Get-MailboxStatistics -Server $server where { $_.DisconnectDate -ne $null } where { $_.DisplayName -like "$search" } fl

}

Write-Host
Write "Finished"

################################################

Thanks

Logan

logu_microsoft@hotmail.com 971552596187

No comments: