search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges

Microsoft PowerShell MVP
MCSE
Sponsors

Cozumpark Bilisim Portali
How to fix incorrect msExchHomeServerName attribute after removing an Exchange Mailbox?
Posted in Windows Powershell | 3 Comments | 14,246 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 (3)

Chris

July 2nd, 2014
19:25:36

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


homeMTA points to Active Directory object that have been deleted | Me tech notes

February 27th, 2015
12:11:05

[…] Source: http://www.yusufozturk.info/windows-powershell/how-to-fix-incorrect-msexchhomeservername-attribute-a… […]


Event 2937 https metechnotes wordpress com 2015 02… | IT Management

May 18th, 2015
04:37:11

[…] http://www.yusufozturk.info/windows-powershell/how-to-fix-incorrect-msexchhomeservername-attribute-a… […]



Leave a Reply