Convert Diacritical Symbol

Introduction

This script will convert diacritical and  to "o" and "a" for all Mailboxes, Groups and Contacts.

Scenarios

This script is to help Exchange to convert diacritical and  to "o" and "a" via PowerShell

Script

Step1: Start the Exchange Management Shell. To run the script in the Exchange Management Shell, type the one command< Script Path> at the Exchange Management Shells.
For example, type C:\Script\ConvertDiacriticals.ps1

Here are some code snippets for your references.

PowerShell
Edit|Remove
$MBXs = Get-Mailbox -ResultSize Unlimited | Where{$_.Name -notlike "DiscoverySearchMailbox*"} | select Name -ExpandProperty Name
Foreach($mbx in $MBXs){
    $Name = $mbx.replace("ö","o")
    $Name = $Name.replace("ä","a")
    if($Name -ne $mbx){
        Set-Mailbox -identity $mbx -Name $Name -DisplayName $Name
    }
}


#Step2,for groups, get All distribution groups
$Groups = Get-DistributionGroup -ResultSize Unlimited | select Name -ExpandProperty Name
If($Groups){
    Foreach($group in $Groups){
        $Name = $group.replace("ö","o")
        $Name = $group.replace("ä","a")
        if($Name -ne $group){
            Set-DistributionGroup -identity $group -Name $Name -DisplayName $Name
        }
    }
}
#Step3,for contacts, get All contacts
$Contacts = Get-MailContact -ResultSize Unlimited | select Name -ExpandProperty Name
If($Contacts){
    Foreach($contact in $Contacts){
        $Name = $contact.replace("ö","o")
        $Name = $contact.replace("ä","a")
        if($Name -ne $contact){
            Set-MailContact -identity $contact -Name $Name -DisplayName $Name
        }
    }
}

Prerequisite

Exchange 2010, Exchange 2013
PowerShell 2.0

Microsoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.