How to exclude a public folder from migration
You would like to exclude a specific public folder from migration when using CodeTwo Exchange Migration or CodeTwo Office 365 Migration.
Unfortunately, there is no such option in CodeTwo migration software that would allow you to select which public folders should or should not be migrated. However, by modifying permissions of particular folders, you can force the software to skip them. In other words, the program will not migrate those folders to which the admin account used to perform the migration has insufficient permissions.
Follow the links below to change folder permissions by using:
- Exchange admin center (applies to Exchange 2013 and newer, including Exchange Online)
- Exchange Management Shell (applies to Exchange 2007 and newer, including Exchange Online)
- Exchange System Manager (applies to Exchange 2003)
- Log in to your Exchange admin center of your source Exchange server.
- Go to public folders > public folders, select the folder you want to exclude from the migration job (in this example, it is folder IT), and click Manage under Folder permissions (Fig. 1.).
- Click the + button to add a new user account and edit its permissions to that folder (Fig. 2.). This user account needs to be the same account as used in your CodeTwo migration software to connect to the source server. If that user account is already listed in the table shown in Fig. 2., then select that user and click the edit (pencil) button instead (you can also go directly to step 5).
- In the public folder permissions window, click Browse to select the user account in question (i.e. the admin account used in CodeTwo migration software, as specified in step 3 above).
- Under Permission level, clear all checkboxes except Folder visible, as shown in Fig. 3.
- Click Save to save changes.
- If there are any subfolders in that folder that you also don't want to migrate, select the Apply changes to this public folder and all its subfolders checkbox and then click Save (Fig. 4.).
Repeat these steps for all public folders you want to exclude from the migration. Once you run the migration job in your CodeTwo software, you will receive the Access is denied notification on the Bad news card for all public folders that failed to be migrated. This is an expected behavior in this case, and you can simply ignore that notification.
If you want to migrate a specific public folder only out of dozens of other folders, you can simply set the Folder visible permission to the root public folder(s) and propagate folder permissions to all subfolders. Next, select the public folder that you want to migrate and, in the public folder permissions window, select e.g. Owner from the Permission level drop-down menu (Fig. 5.). That way only this folder (and its subfolders, if applicable) will be migrated.
To exclude a public folder from being migrated, perform the following steps:
- Open Exchange Management Shell on your source Exchange server.
- Type the following command
Remove-PublicFolderClientPermission -Identity "\folder_path" -User "user_name"where \folder_path is the path of the public folder in question (e.g. \Departments\IT) and user_name is the UPN or alias of the user that is used to connect to your source server in CodeTwo migration software (e.g. admin). This will remove all permissions to the specified folder for that user.
- Type the following command
Add-PublicFolderClientPermission -Identity "\folder_path" -User "user_name" -AccessRights FolderVisibleto grant the Folder visible permission to that folder for the same user as specified in step 2.
From now on, the program will migrate your data excluding the chosen folder. However, the MAPI_E_NO_ACCESS error will be logged for the public folders in question as the program will attempt to migrate and stumble upon permissions problem - this error should be considered as a sign of valid configuration. When migrating via EWS, you will receive this notification instead.
- Open Exchange System Manager on your source Exchange server.
- Expand Folders, Public Folders on the left pane.
- Right-click the public folder that should be excluded from the migration and select Properties.
- Go to the Permissions tab and click Client permissions.
- Click Add and add the user that is used in your CodeTwo migration software to connect to your source server.
- Select newly added user on the list and change Roles to None.
- Click OK to confirm.