How to remove all none primary email addresses from all exchange contacts

All contacts seem to be getting the recipient policies applied to them in exchange 2010.  We have edited the recipient update policy so it doesnt happen on new contacts but we need to remove the addresses from the existing contacts.  Every time we create a contact we set as default the email address we want which is normally a webmail account not a domain account.  Is there an emc script we can run to strip off the none default email addresses from all contacts in the contacts folder?  

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

StuartTechnical Architect - CloudCommented:
you can remove an SMTP address from a mailbox using the EMS

Set-Mailbox "Janet Schorr" -EmailAddresses @{remove=""}

Presuming you know the format of the previous address policy that created the addresses you can easily modify this command to suit


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Arabella ArnoldCommented:
For the removal of Email addresses you can go with following solution, may be it will help you to sort the issue:

After the removal of Email Domain, open your EMS and continue with the mentioned command:
get-mailbox | where {$_.emailaddresses -like “*”}
In place of use that name which you want to remove. By this you can get a list of all the users that have email addresses with that domain name that you have eradicate. If you found no address then the task of removing email addresses is completed otherwise use the below mentioned command
$users = get-mailbox | where{$_.emailaddresses -like “*”}
foreach ($user in $users)
$addresses = (get-mailbox $user.alias).emailaddresses
$fixedaddresses = $addresses | where {$_.proxyaddressstring -notlike “*”}
set-mailbox $user.alias -emailaddresses $fixedaddresses

It will help you to reset your email address on the account
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.