Site icon Franky's Web

Mail-enabled public folders are not displayed in the address list after migration

Some time ago I had already a problem here with the value "MailNickname", which means that the address lists cannot be updated.

The same problem can occur with e-mail activated public folders. The background to this is that in Exchange 2003 times the mail nickname (alias) was still allowed to contain special characters such as spaces etc.. This is no longer the case with Exchange 2010. If you want to display an e-mail-enabled folder, you will also receive a warning on the shell:

Get-MailPublicFolder Test3

WARNING: The object frankysweb.local/Microsoft Exchange System Objects/Test3 has been corrupted and is located in
an inconsistent state. Verification error:
WARNUNG: Eigenschaftenausdruck „Test3  “ ist ungültig. Gültige Werte: Zeichenfolgen, die aus den Buchstaben A bis Z
(Groß- und Kleinbuchstaben), Zahlen von 0 bis 9, !, #, $, %, , ‚, *, +, -, /, =, ?, ^, _, `, {, |, } oder ~ bestehen.
At least one point can be embedded in an alias, but each point must have at least one of the other points embedded in it.
character must precede and follow the alias. Unicode characters from U+00A1 to U+00FF are also valid in an alias,
However, they are stored in the e-mail address created from such an alias with as good a match as possible to a
US-ASCII character string assigned.

I now had the case that there were a large number of e-mail activated public folders, all of which had special characters in the alias/mail nickname. Sometimes spaces or brackets at the end or in the middle.

To avoid having to change all folders manually, I have built a small script that deletes all special characters from the alias

#——————————
# www.FrankysWeb.de
#——————————

$mailfolders = Get-MailPublicFolder -WarningAction SilentlyContinue | Where-Object {$_.Alias -match „\W“}

if ($mailfolders -eq $Null)
{
write-host „“
write-host „Keine Sonderzeichen gefunden!“
write-host „“
}
else
{
foreach ($mailfolder in $mailfolders)
{
$rightalias = $mailfolder.Alias -replace“\W“,““
write-host „Ordner $mailfolder wird geändert. Neuer Alias: $rightalias“
set-mailpublicfolder  „$mailfolder“ -alias „$rightalias“
}
}

Simply copy the script into a PS1 file and execute it. Unfortunately, the script throws the warning as above for each folder with special characters when creating the public folders:

However, the warnings do not affect the function

Exit mobile version