Migrating default Outlook folders

Problem:

You are migrating data between two environments that use different display languages, e.g. English is used on the source server and German on the target one. Once the migration finishes, you notice that the contents of the Inbox folder were not migrated to the Posteingang folder, but instead to a new folder named Inbox that has been created in the target environment.

Solution:

Folders like Inbox, Sent Items, Drafts, Calendar, Contacts, etc. are the default folders used in users’ mailboxes in Exchange and Outlook. These folders have the WellKnownFolderName property that allows them to be identified regardless of the display language set in Exchange/Office 365. CodeTwo migration software takes advantage of that property to migrate data between the default mailbox folders, no matter which language is set in the source and target environments.

However, in certain environments (e.g. after performing data migrations from Exchange 2003), some default folders may lose the WellKnownFolderName property. After migrating these folders to the target server, they will be recreated as regular folders, without the specific properties of the default folders. They will also keep the same name as was used on the source server. Keep in mind that all custom folders, created manually in a mailbox, are also lacking the WellKnownFolderName property.

To be able to migrate the default folders correctly, you need to restore these folders, together with their WellKnownFolderName property, for each problematic mailbox on the source server. To do so, you can either:

If you are still using version 2.x of CodeTwo migration software, refer to this section.

Important

Stop your migration job before you attempt to restore the default folders. This will also prevent migrating more data to the incorrect folders.

However, if some (or all) of your data has already been migrated to the wrongly named folders, after you perform one of the restore operations, you can:

  • restart the migration job and allow the program to migrate the remaining data from the default folders to the correct folders on the target server. After the migration job finishes, you need to manually move the migrated data from the problematic folders to the correct ones;
  • use the Reset mailbox migration state option in your CodeTwo migration software for each mailbox with incorrectly named folders. After doing so, you need to manually delete all migrated data from these mailboxes (on your target server) and then restart the migration job. This will migrate the entire data from the source mailbox to the target mailbox once again.

Restore the missing default folders by using Outlook

  1. Add the mailbox that has wrongly named folders to the desktop version of Outlook.
  2. Close Outlook.
  3. Open the Run dialog box (Windows logo key + R).
  4. Enter the following command:
    Outlook.exe /resetfolders
    
    and click OK (Fig. 1.). This command will run Outlook with the /resetfolders command line switch that reset the default folders of the mailbox.

Using the /resetfolders command line switch for Outlook.
Fig. 1. Using the /resetfolders command line switch
for Outlook to restore the missing default folders.

If you now attempt to migrate data using your CodeTwo migration software, the contents of the source default folders should migrate to the correct folders on the target server. Refer to this section of the article to learn how to handle the data migrated to the incorrect folders.

Restore the default folder names with PowerShell

This solution applies to Exchange 2010 and newer (including Exchange Online).

  1. Connect to your source server using the Exchange Management Shell or PowerShell (learn how to do so here).
  2. Run the following cmdlet:
    Set-MailboxRegionalConfiguration -Identity "<mailbox ID>" -LocalizeDefaultFolderName:$true -Language <language code> -DateFormat <valid date format>
    where:
    <mailbox ID> – can be mailbox user’s name, alias, email address, etc.
    <language code> – needs to include the culture code of the language you want to set on the mailbox. For the list of supported codes, refer to this Microsoft website. Keep in mind that the so-called neutral culture codes, such as en, de or fr, cannot be used – you need to provide a specific culture, i.e. en-us, de-de or fr-fr.
    <valid date format> – needs to be a valid date format appropriate for the specified language. E.g. the default date format for English (United States) is M/d/yyyy. Learn more about date formats here.

Important

If you’re not sure what date format to use, you can provide any value or even omit the -DateFormat parameter. If the cmdlet returns an error, the error text will contain all valid date formats that you can use (Fig. 2.).

An error message in PowerShell containing supported date formats.
Fig. 2. An error message in PowerShell containing supported date formats.

If you now attempt to migrate data using your CodeTwo migration software, the contents of the source default folders should migrate to the correct folders on the target server. Refer to this section of the article to learn how to handle the data migrated to the incorrect folders.

Guidelines for CodeTwo migration software version 2. x

If you are using an older version of CodeTwo Exchange Migration or CodeTwo Office 365 Migration, you might receive the following error if the WellKnownFolderName property is missing:

The specified folder could not be found in the store.

The solutions provided above will fix this problem as well. However, we strongly recommend upgrading your CodeTwo software to the latest version. Use the links below to go to the product's download page.