Im Zuge einer Microsoft Exchange 2013 Migration, bin ich immer wieder auf "Alte" Email-Adressen, wie X400 Adressen gestossen. Um diese Email Adressen in einem Rutsch zu entfernen hilft das kleine nachfolgende Powershell Script:
$Recipients = Get-Mailbox -ResultSize Unlimited | Where {$_.EmailAddresses -like "X400:*"}
foreach ($Recipient in $Recipients)
{
[array]$AllEmailAddresses = $Recipient.EmailAddresses
[array]$NoX400Addresses = $Recipient.EmailAddresses | Where {$_ -notlike "X400:*"}
Write-Host "The user" $Recipient.Identity "has the following smtp addresses" [array]$NoX400Addresses
Set-Mailbox -Identity $Recipient.Identity -EmailAddresses $NoX400Addresses
}
Kommentar schreiben