If you Exchange environment has been through a number of upgrades you may find, with Exchange 2013, you want to clean up unneeded addresses.
The following PowerShell example can assist with this. The code below gets a list of Mailboxes that contain X400 addresses, then creates a new set of email addresses for each recipient, sans X400 address. The new set of email addresses is then applied to the mailbox.
$Recipients = Get-Mailbox -ResultSize Unlimited | Where {$_.EmailAddresses -like “X400:*”} |
You can alter the script to alter other recipient types, such as MailContacts, DistributionGroups and MailPublicFolders. Simply replace Get-Mailbox and Set-Mailbox with the appropriate command.
i have 1000 users where need to remove X400, but i need to remove for first 100 users only..
Can you help.
HI Mujaffar,
Keep two columns; emailID, X400 in SV file
Import-Csv C:\users.csv | % {
Set-Mailbox $_.emailID -EmailAddresses @{remove=$_.X400}
}
Please let me know if you need any further details.
Thanks for the update.. but we have multiple email addresses for list of users who’s X400 Address need to remove.