search
Categories
Archive
Blogroll

Badges

Microsoft PowerShell MVP
MCSE
Sponsors

VirtualMetric
Cozumpark Bilisim Portali
How to fix incorrect msExchHomeServerName attribute after removing an Exchange Mailbox?
Posted in Windows Powershell | 1 Comment | 11,466 views | 27/03/2013 11:03

When you remove an Exchange Mailbox from DAG or your environment, msExchHomeServerName attribute remains same. You may get problem when you try to update user mailbox due to non exist Mailbox Server. In order to achieve this problem, you should get affected mailboxes first, then you should update them with correct mailbox server name.

First get all affected mailboxes:

$Mailboxes = Get-Mailbox -ResultSize Unlimited | where {$_.Servername -eq "Old_Mailbox_Name"}

Update them with this:

1
2
3
4
5
6
7
foreach ($Mailbox in $Mailboxes)
{
Write-Host $Mailbox.Name
$MBX = $null;
$MBX = Get-Mailbox -Identity $Mailbox
Set-Mailbox $MBX -Database $MBX.Database -Confirm:$false -Force -Verbose
}

After that process, all msExchHomeServerName will be corrected.


Comments (1)

Chris

July 2nd, 2014
19:25:36

I have been looking every for this! Thank you. You have saved the day!



Leave a Reply