How to remove smtp proxy addresses – the easy way!

Have you ever needed to remove some unnecessary email proxy addresses? Maybe after a migration process or due to a company name change… There are lots of ways of doing this: scripting, PowerShell or by using third party tools. Is exactly about this last method I'm going to write about.

Meet these 2 neat tools:

AdFind – Command line Active Directory query tool. Mixture of ldapsearch, search.vbs, ldp, dsquery, and dsget tools with a ton of other cool features thrown in for good measure.
AdMod – Command line Active Directory and ADAM LDAP modification tool. This tool combines DSMod, DSRM, and DSMove plus even more such as clearing SIDHistory, CSV updates, moving objects between domains, and much much more that would normally require scripts.

In order to use these tools to remove the smtp proxy addresses of an old domain, here is the complete command line:

adfind -default -rb ou=MIGRATION -f “(proxyaddresses=smtp:*@olddomain.com)” -mvfilter [email protected] proxyaddresses -adcsv | admod proxyaddresses:-:{{proxyaddresses}} -unsafe

You can use them to achieve many different objectives, is just a matter of imagination.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top