Tag Archives: 2010

How to bulk fix inconsistent Exchange Public Folders

This often happens in Exchange 2003 – 2007/2010 migrations with large public folder infrastructures.  Before Exchange 2007, public folder aliases were very relaxed with requirements and allowed a space.  Now those days are over and all the spaces must be removed, but the question is….how?  There are a few guides out there, but unfortunately most of them leave out crucial commands so I will go through my procedure step by step.


WARNING: Object domain.com/Microsoft Exchange System Objects/Bob Jones has been corrupted and it is in an inconsistent state. The following validation errors have occurred:

WARNING: “Bob Jones” 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 on 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 alias”


  1. Determine which public folders are inconsistent.
    get-publicfolder -identity “” -recurse -resultsize unlimited | get-mailpublicfolder | Where {$_.Alias -like “* *”}

    How to export to csv
    get-publicfolder -identity “” -recurse -resultsize unlimited | get-mailpublicfolder | Where {$_.Alias -like “* *”} | select name | export-csv exportlist.csv

    You can also get a line count by using the status bar in notepad.  If the option is disabled, uncheck wordwrap

  2. Fix the inconsistency
    First decide which character you’re going to replace it with and make sure it works with your email naming scheme.  For example, lets use an underscore ( _ ).

    get-publicfolder -identity “” -recurse -resultsize unlimited | get-mailpublicfolder | Where {$_.Alias -like “* *”}  | ForEach-Object {Set-mailpublicfolder $_.name -alias:($_.Alias -replace ” “,”_”)}

    If you wanted to use a period (.), this would be the command…
    get-publicfolder -identity “” -recurse -resultsize unlimited | get-mailpublicfolder | Where {$_.Alias -like “* *”}  | ForEach-Object {Set-mailpublicfolder $_.name -alias:($_.Alias -replace ” “,”.”)}


As always, test out these commands on lower level Public Folders before running it against the root!!!


High CPU utilization after moving Exchange database

After moving an Exchange 2010/2007 database to a new location, the CPU starts spiking with high utilization. msftefd.exe is using most of the CPU cycles and Event IDs 109 and 108 are logged in the System Log by the Search Indexer.

After initial troubleshooting, you likely made it to the Microsoft link entitled “The new Search in Exchange Server 2007“.  This article says that the Exchange Service Indexer triggers a crawl in three instances:

  1. Adding a new Mailbox Database
  2. Adding a new Mailbox
  3. Receiving a new email.

What it doesn’t say specifically is moving a database to a new location has the same content indexing consequences as if a new mailbox database was added.  This will trigger a full crawl of the moved database resulting in high CPU utilization.  The process will not end until a MSExchange Search Indexer Event 110 is logged in the system log.

In a real world environment(~1000 users), it will take approximately 1.6 minutes to process 1 gigabyte.

Example: If you move a 100GB database, it will take approximately 2.6 hours to index.  During this time, msftefd.exe will be utilizing most of the CPU cycles.

How to stop Exchange message tracking logs from truncating prematurely

The Exchange server keeps deleting message tracking logs before they are scheduled to be deleted.  They should stay on the server for 30 days, but they often delete at the 10-15 day mark.  The Log directory currently has 1GB of logs.

Exchange 2007 and 2010 place retention policies on message tracking logs in three ways: Age, Directory Size and File Size.  In this situation the problem is being caused by the Directory Size limit.

  1. First determine what your message directory size settings are currently at by running ” Get-transportserver | select name,*message* ” from the management shell.
  2. Look at the number next to MessageTrackingLogMaxDirectorySize.  In 2007, the default is 250MB.  In 2010, the default is 1GB (1024MB).
  3. Since the log directly is currently maxed out at 1GB, this directory size limitation needs to be raised to 2GB.
  4. From the management shell, run ” Get-transportserver “transportservername” | Set-TransportServer -MessageTrackingLogMaxDirectorySize 2048MB “