No announcement yet.

Remove multiple email addresses for multiple users in different OU's

  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove multiple email addresses for multiple users in different OU's

    Environment: Server 2003 Standard, Exchange 2003, affected OU's=4, users=150

    I'm facing a time consuming problem of removing several email addresses from different users.

    There are multiple OU's setup such as
    OU=Example1 ... OU=Example10

    As of today each user has multiple email addresses such as:
    [email protected], [email protected], ... [email protected]

    and it's true for all other users. I need to make sure that all users from OU=Example1 have only email addresses @example1, therefore I need to remove all email addresses for domains @example2 - @Example10

    Is there a way to remove the unnecessary email addresses automatically instead of doing it by hand?

    Thank you
    Reply With Quote

  • #2
    Re: Remove multiple email addresses for multiple users in different OU's

    Here's an idea, but you should test this first with some dummy users first!

    1. Sort out your Recipient Policies firstly for your Recipient Update Service. I've had a quick look at this, and you'll maybe need one policy per email domain\address that you need to dish out.

    Can't quite see how you'll select your users by OU but there are lots of other fields you might be able to use to pinpoint the users that will go into each policy.

    Once you've done this, you'll have four policies to represent the four OU's that you have.

    Once you've done this, the RUS will go to work, within 15 mins or so, adding your new addresses to all your designated users, if they haven't got it already.

    So far, so good. Now step 2 should get rid of the addresses you don't want.

    2. Select a number of users in AD, and right-click and select Exchange Tasks. There, you'll see Remove Exchange Attributes. Choose this to remove all Exchange Attributes. A little scary.

    3. In ESM, locate those same users you removed attributes from.

    4. Right-click On Mailboxes, and run Clean Up Agent. When you do this, the mailbox for each user will have a red x next to each mailbox.

    5. Right click on each of these disconnected mailboxes and choose Reconnect. Go on to reconnect each mailbox.

    6. Back in AD, if you examine the E-mail address tab for each user, you'll find that it is blank, there are no email addresses at all.

    But within 15 mins or less, the recipient update service will use the policies that you created in step 1 to add your desired email address there.


    So, from the above, a few pointers:

    Important to make sure that your newly created policies work. So please create a few new accounts with mailboxes and wait to see that the RUS does it's job.

    This might be best done out of hours, as during that 15 minute + window, any mail coming to your users will get bounced.

    If there are any important users, you could manually create their new address.

    Within AD, in the E-mail Addresses tab, users must have the "Automatically update e-mail addresses based on recipient policy" ticked. But this is normally ticked by default.

    Happy Testing!



    • #3
      Re: Remove multiple email addresses for multiple users in different OU's


      Thanks for the idea, I'll test it first by creating additional OU;s and test users. I'm planning to do it early next week, and will post the results here.


      • #4
        Re: Remove multiple email addresses for multiple users in different OU's should allow you to remove the email addresses quickly and easily.
        Then sort out your recipient policies.

        Simon Butler
        Exchange MVP

        More Exchange Content:
        Exchange Resources List:
        In the UK? Hire me:

        Sembee is a registered trademark, used here with permission.


        • #5
          Re: Remove multiple email addresses for multiple users in different OU's

          I was able to do the job with ADModify.NET, and before I did anything I created additional OU's for test purposes.

          To remove email addresses using was straight forward, and it took me just few minutes. The bigger challenge was to setup create filter users to use with recipient policies, but a simple change in the "Office" field allowed me to do it.
          (I couldn't filter anything by OU's, and decided to use Office field.)

          For every company I created a filter where:
          - First name must be present
          - Office Location starts with "example"
          And that was it as far as the filtering, and the policies were applied.

          Thank you for your help.


          • #6
            Re: Thanks for sharing

            Thanks for sharing your answer with us! I'm sure others will also benefit from knowing what was wrong and how you fixed it.

            However, we'de appreciate it if you could grant some reputation points to the user that helped you. Just click on the little Yin-Yang icon on the right of the user's answer and follow the prompt.

            Daniel Petri
            Microsoft Most Valuable Professional - Active Directory Directory Services
            MCSA/E, MCTS, MCITP, MCT