Exchange 2010 Powershell to Set as Reply address

We're running Exchange 2010 on Server 2008 R2.  We're looking for a powershell script that will automatically change the "set as reply" address in Exchange.  The new address already exists on the mailboxes but it is not the "set as reply" address.

The further trick, is that we need to only change mailboxes defined in a .csv file.  The .csv would have a single column of usernames.  The goal is that we only want to modify a subset of our total users.

Thanks for any help you can provide.
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.

If you are not using EmailAddressPolicy to update the PrimarySmtpAddress then you need to disable EmailAddressPolicyEnabled attribute to configure the new email as primary.

Try this code..
Import-csv C:\input.csv | % {Set-Mailbox $_.Alias -PrimarySmtpAddress $_.Email -EmailAddressPolicyEnabled:$False}

Open in new window

Input csv file format..

Open in new window


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
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
That's a very subsun-centric reply :D
Next time I will add your name too.. ;-)
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

xavier08Author Commented:
Thanks for the reply.  I appreciate you taking the time.  We're going to test your script shortly.  It looks similar to another script we put together earlier... but that one cleared all existing addresses and replaced them with the addresses specified in our script.  Will this do the same?

Also, it would be great to use address policy to update this but for some reason our address policies aren't getting applied.  The box to apply policy is checked on all mailboxes.  But that's a separate problem.  For now it would just be nice to get this script working.
The command will not overwrite the email addresses..
xavier08Author Commented:
Thanks for your help. This is working perfectly.
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.