VBScript to change users SMTP addresses

Posted on 2010-01-04
Last Modified: 2012-05-08
Does anyone have a good example of a vbscript that will get all SMTP addresses listed for a user and append a value at the end of each address?

I.e. A user has two email addresses and  The vbscript would look change each address to and

Assumption is the 'Automatically update e-mail addresses based on e-mail address policy' is not checked for the user.
Question by:TexasPlowBoy
    LVL 3

    Expert Comment

    You could use LDIFDE for the export, edit the SMTP addresses and then use LDIFDE to import the changes back in.  This will export out ALL SMTP addresses;

    ldifde -f smtpaddresses.txt -d "dc=domain,dc=com" -l proxyaddresses -r "(proxyaddresses=*)"

    But, it sounds like you might be trying to disable SMTP for a select group of users, is that what you are trying to do?   There are ways to do disable Internet email using a security group and some other steps.  If that is your goal, reply back and also with the version of Exchange.  If not, my apologies.
    LVL 8

    Accepted Solution

    see and the following parts 2 and 3 for a whole tutorial.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now