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?  

Thanks
LVL 1
cloughsAsked:
Who is Participating?
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

eg
Set-Mailbox "Janet Schorr" -EmailAddresses @{remove="janets@corp.contoso.com"}


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

Stuart
0

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 “*domain.com”}
In place of domain.com 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 “*domain.com”}
foreach ($user in $users)
{
$addresses = (get-mailbox $user.alias).emailaddresses
$fixedaddresses = $addresses | where {$_.proxyaddressstring -notlike “*domain.com”}
set-mailbox $user.alias -emailaddresses $fixedaddresses
}

It will help you to reset your email address on the account
0
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
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.