email address policies exchange 2010

We have a bunch of email address policies and need to remove them. For example we have a mail domain policy for example ugly.com and it is applied to every OU through an email address policy. %m@ugly.com this is what shows up under email address policies. Is there a way as I have been looking through the command set-emailaddresspolicy to automate this process for all OU's. If I place the object type in a file and did a forloop can this be accomplished

$OU=get-content c:\temp\ou.csv
for (i in $ou) {
set-emailaddresspolicy  -id $_  %m@ugly.com

}

Also by removing the email address policy does it remove it from the existing alias. It does not appear to do this for the few I have done but wanted to confirm.
techdriveAsked:
Who is Participating?
 
AmitConnect With a Mentor IT ArchitectCommented:
Answer to your query is, if you don't need that email policy for users, just remove it. Rest will be updated automatically. I don't see any reason for alias change, however email address will be removed for those policies, if automatically update check box is selected.
0
 
Malli BoppeConnect With a Mentor Commented:
To remove the existing aliases from user mailboxes you can use 3rd party tools.
In the past I have used ADmodify to remove all email address for a particular domain.
The tool is free and very simple to use
0
 
techdriveAuthor Commented:
no solution ended up doing this manually myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.