no longer needed Domain name

Brass Contributor

We are in the process of final preparations for migration of 2000 odd mailboxes to online and have come across an issue of an unwanted domain in users E mail address aliases. This was used many moons ago when we moved from Lotus notes to Exchange!!

 

So what I am looking for is a PowerShell script to remove any e mail address where the domain extension is .biz

 

Anyone have any ideas?

 

thanks 

2 Replies

This is easily doable via PowerShell, however you need to handle cases where said address is added as primary SMTP address differently from the ones where it's a secondary one. For the former, you will need to replace the alias instead of directly removing it.

 

Here's a short code sample I wrote a while back that might help: https://www.michev.info/Blog/Post/2011/bulk-replacing-proxy-addresses-based-on-a-pattern

@Vasil Michev  thanks for the reply; Fortunately these are never Primary SMTP :) . i will have a play later this afternoon and get back to you....