Update to the Remove-ExchangeProxyAddresses script

5/5 - (2 votes)

Today, I received an email from a customer that one of the scripts I had in the gallery wasn’t working correctly.  Yes, I know it’s hard to believe, but I made an update and didn’t regression test completely, and then something stopped working.

Say it ain't so!

Say.

It.

Ain’t.

So.

What turned out to be the problem?  If inquiring minds want to know, please investigate and tell me.  The only thing I can determine is that I sent a particular value as an argument to Get-Mailbox, the script would skip it.  If I typed it interactively, it worked fine. If I passed the same argument to Get-MailContact or Get-MailUser, it worked fine.

The reasoning eludes me.  But, I have updated the script and tested it against mailboxes, mail contacts, and mail users, and have updated the logging and display output to screen for those moments when you are trying to remove an address pattern and it is set as the primary SMTP address of the object.  It will bark at you, since Exchange doesn’t like it.  At least, now you’ll have a log that tells you so.

The updated TN PowerShell gallery script is here:

https://www.powershellgallery.com/packages/Remove-ExchangeProxyAddresses/

 

author avatar
Aaron Guilmette
Helping companies conquer inferior technology since 1997. I spend my time developing and implementing technology solutions so people can spend less time with technology. Specialties: Active Directory and Exchange consulting and deployment, Virtualization, Disaster Recovery, Office 365, datacenter migration/consolidation, cheese.

One Reply to “Update to the Remove-ExchangeProxyAddresses script”

Comments are closed.