This script will remove proxy addresses for a specific SMTP domain from a specified list of users. You can change the domain by editing the strSMTPDomain value in the script. The input file called users.txt is a list of display names. For my needs I reformatted the output from my previous script. By specifying the domain and the list of users it reduces the chances of any mistakes.
The script takes the input file and processes each listed user. It checks all the proxy addresses for the user and deletes any that match the specified domain. Two output files are produced. The first is a processing log which lists whether each user was found and how many addresses were removed for that user. The second file is a log of all addresses removed which can be used as a reference in the event of a mistake.
You can download the script here: StripLegacyProxyAddresses.vbs.txt
I am getting the following error when executing the StripLegacyProxyAddress.vbs. I renamed the script Stripproxyaddresses.vbs:
I also replaced the strSMTPDomain to strSMTPDomain = “Apple.com”
Stripproxyaddresses.vbs(1, 1) Microsoft VBScript compilation error: Expected statement
The users.txt file is in the C:\ and is as follows:
[users.txt]
Test smtp:Test@Apple.com
Test smtp:Test@Test.com
Test smtp:Test@plume.com
Test2 smtp:Test2@Apple.com
Test2 smtp:Test2@Test.com
Test2 smtp:Test2@plume.com
I also tried the following:
[users.txt]
Test
Test2
Any suggestions? I am wanting to remove SMTP addresses from all users in our domain.
Sam
By: Sam on December 4, 2006
at 4:15 am
Big thanks for your script !
By: bnj on January 14, 2007
at 10:13 am
Can this script be modified to read an excel spreadsheet? What I am looking to do is to removed smtp addresses from users that I have on a spreasheet. The spreadsheet as the samid, dn and the smtp address to remove.
By: Rich on September 12, 2007
at 2:37 pm
Thankyou very much! it works wonderful. just that i need.
By: Frf on June 1, 2011
at 9:31 am
Thanks for this series of scripts. I’m not a ‘scripter’ but yours helped me remove a legacy smtp address from about 250 of our 200+ users!
By: Bob Eadie on June 24, 2013
at 2:21 pm