« This is Tokyo! Part 14 - Sincerely, The Toilet | SipPhone Sucks (A review of a VOIP service to avoid) »

Automating Public Folder Moves in Exchange 200x

Part of the reason I've not posted here regularly is the 1600 user Exchange migration I'm working on right now. (The rest of the reason is I'm either lazy or fixing something at home. :-)

I'm almost ready to start the production migration, so it's time to populate the new Exchange 2003 environment with the public folders on the current legacy (OK, 5.5 to be exact) server. Thanks to having no limits and no cleanup for the last 5 years, there's a health 2.1 GB of local PF content and another 14 GB of stuff from the home office.

The Problem:
* I want to move PF's in batches to keep from saturating the link to the home office.
* I'm also lazy and don't want to click on all 3300 folders to individually set the replica. If I were just lazy I could use pfmigrate to set the replica, but that tool is the sledge hammer of migration. I want the ball-peen hammer of migration.

The Solution:
So, today we'll use PFDAVAdmin 2.5 (available here) and do an export / import to change the replica's on the PF tree. If you like Exchange, read on. If this doesn't make sense to you, why'd you read this far...?

The download from Microsoft includes a doc file with a good explanation of the features. The GUI itself will allow you to set replica's on PF's, but unfortunately you can't select multiple folders at one time (hint to Microsoft), nor apply the changes to subfolders (hint again Microsoft!). But, we can export the replica configuration to a (tab delimited) text file, edit it, the re-import it and we're golden.

Here's the steps:

1. Install PFDAVAdmin if you don't already have it.
2. Open PFDAVAdmin and connect to an Exchange server. You will have to authenticate, may as well as connect to your PF server. Choose PF mode.
3. Open up your PF tree, highlight the PF that you want to mangle, er modify...? In this case I'm doing "Shared Resources" off the root of the PF Tree. This is where the meeting room calendars tend to live.
4. Choose Tools, Export Replica Lists. You could do "All public folders" but for me, I just want the branch and subfolders I've selected, so I'll choose Selected folders and subfolders. Next assign a file name, I'll go with export.txt.
5. Open the exported file in Notepad (or Excel if you have a lot of folders).

Sample of the exported file "Export.txt"
# ************************************************************************
# Created with PFDAVAdmin 2.5
# Thursday, April 27, 2006 2:18:38 PM
# ************************************************************************
#
# This file has been generated for use with PFAdmin.exe (v1.3 or higher)
# shipped in the Microsoft BackOffice Resource Kit.
#
# ************************************************************************
SETREPLICAS Public Folders\Shared Resources\Pencil Sharpener Reservations REPLACE EXCHSRVR01 NO

(Note: This file is output in tab delimitated format, this may not display correctly on the web).

Here's the explanation of the fields from the documantation:
[snip]
Input file format:
SETREPLICAS Folder Option Server(s)
[ Option Server(s)]...[ YES|NO]

Folder = public folder name
Option = ADD server(s) to replica list
DELETE server(s) from replica list
REPLACE replica list with server(s)
Server(s) = [Site\]Server[,[Site\]Server]...
Site = replica site (default = same site)
Server = replica server
YES|NO = apply changes to subfolders? (default = YES)
[/snip]

Here's the change I'm putting in my import.txt file
SETREPLICAS Public Folders\Shared Resources\Pencil Sharpener Reservations REPLACE EXCHSRVR01 EXCHSRVR02 YES

I've added the second Exchange server name, and changes the apply to subfolders from No to Yes. That's it.

6. Hit Tools, Import, then choose the file import.txt and click open. This will immediately start the process, so make sure you're ready. The GUI window will display the progress, click the little "X" to close the window when it's finished. I'd strongly encourage turning logging on so you can track what you've done.

PFDAVAdmin has extensive features for changing and exporting permissions / DACLs and making low level tweaks to most of the fields exposed in PR_ fields. Check it out.

The standard boilerplate:
Warning: this is a powerful low level editing tool and you can quickly mangle things if you're not careful and understand what you're doing. This author takes no responsibility for any results of, or the accuracy of the above information, which is offered with no warranty of any sort, form or type. Have a day.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)