Troubleshooting a Public Folder Migration to 2013

Migrating Public Folders from 2007/2010 to 2013 requires quite a different process than any previous Public Folder migrations. With the architectural changes made in 2013 this should be no surprise as we now need to replicate data from a database to a mailbox. As with all migrations there are sometimes things that are out of our control. Let’s walk through a real world situation where the migration of Public Folders did not go as well as planned.

During a production Public Folder migration, a client of mine ran into multiple issues with the migration from Exchange 2010 to 2013 Public Folder. Since the entire process of Public Folder migration is done with PowerShell, how would you know if the migration is held up or crashed or had issues? PowerShell.

OK. So now back to the client and their issues. The first five steps of the migration went well (Microsoft Public Folder migration document). Once the migration was started, we decided to monitor the progress every 5-15 minutes to see if there were any issues to be resolved. To check the migration, we used a condensed PowerShell one-liner to get the information we needed:

  • Get-PublicFolderMigrationRequest I Get-PublicFolderMigrationRequestStatistics -IncludeReport I ft name,status*,*transferred*,percentcomplete -auto
    PFMigrationTS-05-CL


After 15 minutes, when were checking the status of the migration we noticed that the migration status showed as failed. To get information on what had failed, we modify the PowerShell script to use ‘fl’ (format list) instead of ‘ft’ (format table).
The main reason we do this is that if you don’t, the amount of detail revealed by ft is too small:

PublicFoldersMigration04
So now we run the command with fl:

  • Get-PublicFolderMigrationRequest I Get-PublicFolderMigrationRequestStatistics -IncludeReport I fl
    PFMigration-Good-13s
    and get these results:

    PFMigrationTS-06



As you can see, we have issues with the illegal characters Alias of some Public Folders. After investigating the ones with issues, it appears that the folders in question have spaces either leading, trailing or otherwise. How do we get rid of the space? First, lets verify the groups have these characters:

  • $pfs= Get-publicfolder “\” -recurse | where {$_.MailEnabled -eq “True”} | Get-MailPublicFolder | where {$_.alias -like ‘* *’ -or $_.alias -like ‘*,*’}
  • Running it will result in a screen similar to this:

    PublicFoldersMigration07


After the issue is confirmed, run this command to remove the spaces from the Alias.

  • foreach($pf in $pfs) {set-mailpublicfolder $pf.Identity -Alias:($pf.alias -replace ‘\s|\,’,”)}
    PublicFoldersMigration08




Once the offending groups were corrected, we resumed the migration:

  • get-publicfoldermigrationrequest | resume-publicfoldermigrationrequest
    PFMigrationTS-04


Once the migration resumed, we carefully monitored the migration to make sure no other errors occurred. After about an hour or so, the migration stopped again.

  • We ran the one-liner to check for more detail on the error:
    PublicFoldersMigration11

  • more on the error:
    PublicFoldersMigration12



As you can see, we hit a bad items limit for the Public Folder migration. Let’s increase the limit and resume the migration:

PublicFoldersMigration13
We get an informational warning about raising the limit is not always recommended due to data loss.

If we look at the complete log for a migration, up to the autosuspend part, there is quite a bit of information about what is going on:

PublicFoldersMigration16-f

In the red circled areas you can see some of the errors that could occur in a typical production migration of Public Folders. From fatal errors (in our case spaces in PF aliases, to corrupted items, even Transient errors which self correct (note the retry (1/60)) as well as the fatal error about too many bad items. All of this information is revealed with the ‘ -IncludeReport’ switch with the Get-PublicFolderMigrationRequestStatistics command we use to monitor the migration.

Well I hope this article will help you troubleshoot any errors you get with migration of your Public Folders to Exchange 2013.

Related Resources
Get-PublicFolderMigrationRequestStatistics
Get-PublicFolderMigrationRequest

Advertisements

22 thoughts on “Troubleshooting a Public Folder Migration to 2013

  1. Hai !
    THanks for the great solution.
    One tip change the command:
    foreach($pf in $pfs) {set-mailpublicfolder $pf.Identity -Alias:($pf.alias -replace ‘\s|\,’,”)}
    to
    foreach($pf in $pfs) {set-mailpublicfolder $pf.Identity -Alias:($pf.alias -replace ‘\s|\,’,”)}

    The last ” must be 2 singel ‘
    Thanks !!!

      • In fact I tried to replace the ” by 2 singles ‘ and I got the following error:

        Set-MailPublicFolder : Cannot bind argument to parameter ‘Identity’ because it is null.
        At line:1 char:43
        + foreach($pf in $pfs) {set-mailpublicfolder <<<< $pf.Identity -Alias:($pf.alias -replace '\s|\,','')}
        + CategoryInfo : InvalidData: (:) [Set-MailPublicFolder], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
        icrosoft.Exchange.Management.MapiTasks.SetMailPublicFolder

      • Did you run this part of the script – $pfs= Get-publicfolder “\” -recurse | where {$_.MailEnabled -eq “True”} | Get-MailPublicFolder | where {$_.alias -like ‘* *’ -or $_.alias -like ‘*,*’} ?

      • Yes I ran it but as I’m not really a PS guy, I’m not quite sure where the issue is coming from, but by doing the $pfs=…. we are defining the $pfs variable right ? but where are we defining the $pf variable in the above command lines ?

      • Just above there is another code line that was assumed to be run just prior to that one in the same PowerShell session. That way the variable would already be defined. Here is the code line:
        $pfs= Get-publicfolder “\” -recurse | where {$_.MailEnabled -eq “True”} | Get-MailPublicFolder | where {$_.alias -like ‘* *’ -or $_.alias -like ‘*,*’}

    • Ran into the same issue. The command when pasted into powershell inserts a single quote instead of two ‘ ‘ . When pasting the command into a text editor it is correct however. Had to manually change in the powershell gui and then it worked!

  2. Great documentation, about the foreach($pf in $pfs) {set-mailpublicfolder $pf.Identity -Alias:($pf.alias -replace ‘\s|\,’,”)} the command is running since few time now and still having >> sign, I suppose it’s still running ? We have approx. 10 000 PF …
    Also not sure to understand your comment Richard
    Regards

  3. The frustrating thing is even some Default Public Folders have spaces in them, like “Organizational Forms”. Nice script. Saved me a bunch of time. Not sure why spaces aren’t supported, doesn’t make much sense to me.

  4. Hi Bonjour

    I m migrating public folder 2010 to 2013

    When i do :

    Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | Format-List

    I have a lot of line like this

    00-00-00-00-1A-44-73-90-AA-66-11-CD-9B-C8-00-AA-00-2F-C4-5A-03-00-36-B9-C6-5D-38-99-D6-11-9B-D6-00-08-02-55-A6-70-00-00-00-18-33-94-00-00 ». Ce dossier peut être
    lié manuellement en exécutant la cmdlet Enable-MailPublicFolder une fois la migration terminée.
    23/05/2014 19:18:02 [serveur] Avertissement : échec de recherche ou de liaison de l’objet destinataire « 96-7D-85-6C-DC-A6-83-42-AC-77-A4-5E-BD-CD-52-9B » dans
    Active Directory pour le dossier public à extension messagerie « Public Root/IPM_SUBTREE/Secrétariat RC/PAYS/VENEZUELA/2006/SINCOR » avec l’ID d’entrée «
    00-00-00-00-1A-44-73-90-AA-66-11-CD-9B-C8-00-AA-00-2F-C4-5A-03-00-36-B9-C6-5D-38-99-D6-11-9B-D6-00-08-02-55-A6-70-00-00-00-13-4D-8A-00-00 ». Ce dossier peut être
    lié manuellement en exécutant la cmdlet Enable-MailPublicFolder une fois la migration terminée.
    23/05/2014 19:18:52 [serveur] Avertissement : échec de recherche ou de liaison de l’objet destinataire « 25-86-EC-2D-ED-25-C6-49-83-B6-5F-E9-8C-2E-34-A4 » dans
    Active Directory pour le dossier public à extension messagerie « Public Root/IPM_SUBTREE/Secrétariat RC/Repertoire 2007 » avec l’ID d’entrée «
    00-00-00-00-1A-44-73-90-AA-66-11-CD-9B-C8-00-AA-00-2F-C4-5A-03-00-36-B9-C6-5D-38-99-D6-11-9B-D6-00-08-02-55-A6-70-00-00-00-11-F5-9D-00-00 ». Ce dossier peut être
    lié manuellement en exécutant la cmdlet Enable-MailPublicFolder une fois la migration terminée.
    23/05/2014 19:18:57 [serveur] Avertissement : échec de recherche ou de liaison de l’objet destinataire « ED-80-51-1F-67-6A-B9-41-AA-B8-0C-14-C4-BF-07-A3 » dans
    Active Directory pour le dossier public à extension messagerie « Public Root/NON_IPM_SUBTREE/EFORMS REGISTRY/Organization(409) » avec l’ID d’entrée «
    00-00-00-00-1A-44-73-90-AA-66-11-CD-9B-C8-00-AA-00-2F-C4-5A-03-00-36-B9-C6-5D-38-99-D6-11-9B-D6-00-08-02-55-A6-70-00-00-00-00-1F-49-00-00 ». Ce dossier peut être
    lié manuellement en exécutant la cmdlet Enable-MailPublicFolder une fois la migration terminée.

    it scared me, what does it means ? Do i do something wrong?
    I have let it work
    And when i check status i have this :

    Statut: Failed
    Détails status : Failed other
    Syncstages : Copying message
    Estimed transfert size : 0
    Pourcentcomplete : 95

    What do i do? Can You help me? I m a little scared right now

    Thanks

  5. Hi Thanks much for the great command.
    however in my scenario not all public folder’s are mail enabled. For testing purpose on one of the public folder which is not mail enabled I tried below command :

    $PFM=Get-publicfolder -identity “003\Jose & Mark Lee”
    foreach($pf in $PFM) {set-mailpublicfolder $pf.Identity -Alias:($pf.alias -replace `\s|\,’,”)}

    Which errored as below :

    Invoke-Command : Cannot bind parameter ‘Alias’ to the target. Exception setting “Alias”: “The property can’t be empty.”

    Since this is not a mail enabled public folder, I understood Alias property is not valid for this public folder, hence the command will error.

    What should be done to remove the spaces and replace them with “-” from the public folders which are not mail enabled.

  6. I’m having an issue and the command isn’t returning any results:

    Here’s my error:

    Error: Property expression “Company Calendar” isn’t valid. 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 period 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
    e-mail address, which is generated from such an alias.

    Here’s the command I’m running with no results returned:

    $pfs= Get-publicfolder “\” -recurse | where {$_.MailEnabled -eq “True”} | Get-MailPublicFolder | where {$_.alias -like ‘* *’ -or $_.alias -like ‘*,*’}

    Any help?

    Thanks

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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