Comparing Public Folder Item Counts After Migration in Exchange Server

Tej Pratap Shukla | Published: July 22, 2016 | Exchange Server, General Info | 5 Minutes Reading

Administrator can manage, collect, organize, and share information with other people in an organization using Public folders which is an easy and effective way of sharing information. The Public folders are stored in Microsoft Exchange servers centrally that can store e-mail messages, calendar appointments, tasks, contacts, and notes.
For instance, If an organization migrating the public folders from Exchange 2003 to Exchange 2010, it’s database must also be migrated. When the organization is migrating the public folders, copies of all public folders and their respective content must be replicated to the new environment, during a period of coexistence between the two Exchange Server environments, the public folder databases must be kept in sync via public folder replication.
User can migrate up to 500,000 public folders at a time in Exchange server. If there are more than 500,000 public folders, in that case user can create batches of public folders for migration. Each batch will have of less than 500,000 public folders. But the question arises whether there is replication in added public folder database as the administrator is adding a new Public Folder database to the Exchange Server and replicating of large amount of data to it.
Going through each replication event is very tedious task for admin, there is a procedures that can identify the progress of replication by comparing public folder item counts after migration.

How To Get Public Folder Item Counts

To get the public folder item count admin can use following command:
Get-PublicFolderStatistics -Server -ResultSize unlimited | Export-Csv c:\file1.txt

Public Folder Item Counts Comparison

Before starting the comparison there are some points or cautions that admin should know:

  • If there is same number of items on both sides, does not mean that the folders are in sync.
  • The item counts can be different on different version of Exchange because the way WebDAV interacts with those items is different for each version.
  • Checking item counts of public folder is more reliable than simply comparing item sizes
  • The two databases are present in different stages of processing replication messages.
  • If admin want to know if two replicas are in sync, they can remove one instance. If Exchange lets you remove the instance, it symbolizes the two instance are in sync.

Steps For Comparing Public Folder Item Counts

There are some steps that are involved in public folder item comparison:

  1. Admin needs to create a new Microsoft Access database that has more than double the size of your CSV files.
  2. Use Export-Csv cmdlet that will includes the .NET type information in the first line of the CSV output.
  3. Import the CSV file in new table Import CSV - comparing public folder item counts
  4. The window will starts showing that the file is delimited and then click Next.
  5. Now choose delimeter as comma and set “First Row Contains Field Names” First Row Contains Field names - comparing public folder item counts
  6. Switch to Advance View
  7. Now Click OK on the Advanced dialog and then click Finish in the window.
  8. Save the Import steps and click Close
  9. Access query will import data into a table
  10. Repeat step 2 to import the second file.
  11. Run the query to determine if any folderPath exceeds 255 characters. If it exceed than 255 characters it cannot be used for a join in an Access query.
  12. Now Select the option highlighted.
    highlighted - comparing public folder item counts
  13. Select the table where user wants to check the length of folderPath. select table - comparing public folder item counts
  14. Now switch the SQL view by clicking the View option SQL View - comparing public folder item counts
  15. Now run the query using red “!”
    run - comparing public folder item counts
  16. User will get the single empty row.
  17. The FolderPath was imported as a memo field. However user cannot join memo fields in a query. Therefore, user needs to convert them to a text field with a length of 255.
  18. Change the folderPath from Memo to Text
    text to memo - comparing public folder item counts
  19. Change the field size of folderpath to 255 characters
    field size - comparing public folder item counts
  20. Now Save the table and close its design view.
  21. For comparison, create a new query and highlight both the tables having FolderPath 255 characters.
  22. Now drag FolderPath from the source table that is the replication to FolderPath on the other database. Folder Path - comparing public folder item counts
  23. Make fields appear in grid form
    1. Change the SQL view and add them to the Select statement
    2. Now double-click the field in the top half of the window
    3. Drag the field from the window to the grid
    4. Click in the Field of the grid
    5. Enter the field name that user wants on the Field present in the grid
  24. Go to the empty column in the grid and enter the text that will indicate the difference between two item counts.
  25. In last step run the query using “!” option, the results of this query will show the folders that exist in both public folder database, the item count in each public folder and difference between them.

Conclusion

We can conclude that in this post we discussed about comparing public folder item counts in Exchange Server, for the successful replication of public folders between two Exchange environment can be verified by comparing their item counts.