office 365 remove secondary smtp alias on microsoft dirsynched

Hello ,

i when i am connecting from powershell i want to remove to each user the secondary smtp alias onmicrosoft.com. because it is confusing the people .I just want to have the domain only smtp.can you help me with the command of smtp deletion??Also is there any software that can make my life easier and make changes from there??

Thanks.
Mark SoultchAsked:
Who is Participating?
 
Marwan OsmanCommented:
Check this tool it seems but I have a limited access to the internet so I didn't check if it works with new versions of AD and exchange, get it from the below link

http://m.msexchange.org/articles-tutorials/exchange-server-2003/management-administration/Implementing-Custom-Recipient-Policies.html
0
 
Marwan OsmanCommented:
check http://community.office365.com/en-us/f/148/t/266430.aspx they mentioned a script to remove bulk of emails with specific domain

and the below is also helpful

http://o365info.com/manage-email-address-using-powershell/
0
 
Mark SoultchAuthor Commented:
i tried but it  replies me the message  failed because it's out of the current user's write scope
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
Marwan OsmanCommented:
So try the one in the below link after changing the domain name in the script to yours:

https://www.exchangecore.com/blog/powershell-removing-secondary-smtp-addresses-specified-domain/
0
 
Mark SoultchAuthor Commented:
not helping me
0
 
Marwan OsmanCommented:
You must run it on windows server 2003:

https://admodify.codeplex.com/releases/view/6065
0
 
Marwan OsmanCommented:
Did you try the second script i mentioned? Try it and read the exported file to see what did happened
0
 
Mark SoultchAuthor Commented:
i must remove it online but it is dirsynch
0
 
Marwan OsmanCommented:
0
 
Marwan OsmanCommented:
What is the error when u run the script?
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.