Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Change Email from CAPS to lower case in Exchange Server 2010

Posted on 2014-04-01
7
327 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 19

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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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

Does Powershell have you tied up in knots?

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

792 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