Exchange 2007 and Spaces in the Alias field

I’ve not been able to find much documentation about this online yet, but I discovered this issue in my Exchange 2007 Migration Lab: Exchange 2007 doesn’t like spaces in the alias field of mail-enabled objects.


These spaces will cause any migration of the object into the Exchange 2007 system to fail with the following error:


WARNING: Object Exchange System Objects/Consumer

Support has been corrupted and it is in an inconsistent state. The following

validation errors have occurred:

WARNING: “Consumer Support” is not valid for Alias. Valid values are: Strings

formed with characters from a to z (uppercase or lowercase), digits from 0 to

9, !, #, $, %, &, ‘, *, +, -, /, =, ?, ^, _, `, {, |, } or ~. One or more

periods may be embedded in an alias, but each one of them should be preceded

and followed by at least one of the other characters. Unicode characters from

U+00A1 to U+00FF are also valid in an alias, but they will be mapped to a

best-fit US-ASCII string in the email address which is generated from such an



Before you can begin the migration of your AD objects to Exchange 2007, you must update all objects in AD to remove the space.  In my case, I opted for replacing the space with an underscore (i.e. in the above example, “Consumer Support” will become “Consumer_Support”).  This change should only affect the alias property in AD and not the display name.


I wrote the following procedure involving AD Users & Computers and Powershell to correct the issue in my environment prior to installing the Exchange 2007 Schema updates:



  • Create an AD Users & Computers search query to search all exchange-enabled objects.  Include the “Exchange Alias” filed in the column headers
  • Export this list to a tab-delimited file.
  • Open this file in Excel, change the “Exchange Alias” column header to just “Alias”, and re-save as a CSV file
  • Open Powershell
    • $mailobjects = import-csv exportedfile.csv
    • $mailboxes | Where-Object {$_.alias -match ” “} | Export-CSV bad_exchaliases.csv
    • Open in Excel, remove all columns but “Alias”
    • Duplicate the “Alias” column, name it New_Alias
    • In the duplicated column, find/replace all ” ” with “_”
    • Save CSV file
    • $badaliases = import-csv bad_exchaliases.csv
    • $cred = Get-Credential (input credentials with rights to modify all objects)
    • foreach ($object in $badaliases) {Set-QADObject -Identity $object.Alias -ObjectAttributes @{mailnickname=$object.New_Alias} -Credential $cred

Update: Found this page on TechNet:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s