Solved

Change Email from CAPS to lower case in Exchange Server 2010

Posted on 2014-04-01
7
250 Views
Last Modified: 2016-06-03
I have a Client who is aking something strange
She has an ACtive directory which is not very Clean and and email adress policy which is: Surname.name@

she wants that every email be in the lower case format . ie: samson.siasia@test.com

How do i Transform : Samson. SIASIA@ or Samson. Siasia to samson.siasia@test.com
0
Comment
Question by:gazambey
7 Comments
 
LVL 18

Accepted Solution

by:
Peter Hutchison earned 95 total points
ID: 39968674
You could use the ToLower() function to change the case of people's Email addresses
e.g.

$mbxlist = Get-Mailbox
Foreach ($user in $mbxlist)
{
  $usermail = $mail.EmailAddresses
  $newemail = ""
  Foreach ($email in $usermail)
  {
      $lowermail = $email.SmtpAddress.ToLower()
      $newemail = "$newemail$loweremail,"
  }
  $newemail = $newemail.substring(0, $newemail.length-1)
  Set-mailbox -Id $user.Identity -EmailAddresses $newemail
}
0
 
LVL 25

Expert Comment

by:Zephyr ICT
ID: 39968671
You could try the ADModify tool to change them: http://admodify.codeplex.com/releases/view/6065#ReviewsAnchor
0
 
LVL 10

Assisted Solution

by:Scott Thomson
Scott Thomson earned 95 total points
ID: 39968683
Hey Gazambey,

I think this would do the trick for you?

but be careful and make sure you understand the script before you do implement it.

Any other experts also please feel free to modify it

http://blogs.technet.com/b/heyscriptingguy/archive/2008/01/08/how-can-i-modify-the-email-addresses-of-all-the-users-in-an-ou-and-its-subous.aspx

On Error Resume Next

Const ADS_SCOPE_SUBTREE = 2

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand =   CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection

objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 

objCommand.CommandText = _
    "SELECT AdsPath FROM 'LDAP://OU=Finance,DC=fabrikam,DC=com' WHERE objectCategory='user'"  
Set objRecordSet = objCommand.Execute

objRecordSet.MoveFirst
Do Until objRecordSet.EOF
    Set objUser = GetObject(objRecordSet.Fields("AdsPath").Value)
    strEmailAddress = objUser.Mail
    strEmailAddress = LCase(strEmailAddress)
    objUser.Mail = strEmailAddress
    objUser.SetInfo
    objRecordSet.MoveNext
Loop

Open in new window

0
Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

 

Author Comment

by:gazambey
ID: 39968698
Hello Scot

What will be the manual process please?

Rgds
0
 
LVL 10

Expert Comment

by:Scott Thomson
ID: 39968735
I am sorry are you asking for the manual process as in you want to go through and change each email by itself..?

if not please explain further :)

Thanks
0
 

Author Comment

by:gazambey
ID: 39968744
YEs Scott I'm asking for the manual Process  as you said

Because the format of email is not uniform in the ACtive Directory .  If you have it please I'll be glad to hear

Rgds
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
how to add IIS SMTP to handle application/Scanner relays into office 365.

760 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

18 Experts available now in Live!

Get 1:1 Help Now