We’ve been doing a number of migrations from SBS 2008 and SBS 2011 over to Windows Server 2012 R2 Essentials + Exchange 2013., or other variations. So far all the clients have needed to migrate their public folders which is a long and complicated process that really is a pain.
Recently we’ve had the need to migrate a client that has no Public Folders in their Exchange environment, so it gave me the chance to figure out how to do it. Whilst I searched for answers, I found that there was no single document on the Internet that showed exactly what needed to be done, so I’ve created one here.
Use this process if you wish to entirely remove the public folders from an Exchange 2007/2010 Organisation instead of performing a migration. This is a one way process. Data will be lost if you proceed.
Verify what Public Folders are in use
Use Outlook or OWA to open the Public Folder tree from a client machine. Verify what public folders are present. Export any required information to a PST file just in case the client requires it later.
Delete unnecessary public folders
Use the Exchange 2007/2010 Public Folder Management Console on the Exchange 2007/2010 server
Expand the Default Public Folders Tree
Select each public folder in the middle pane and right click and select Remove
If the Exchange Organisation you are migrating has been on Exchange 2000 and then later 2003 – you will have an Internet Newsgroups folder. This folder cannot be deleted using the method above. Instead you will need to use ADSIEdit later in the procedure to delete the Public Folder Database to resolve this issue.
Remove any Public Folder hosted Offline Address lists
Verify that the new Exchange 2013 Offline Address list is now the default with this command
Get-offlineaddressbook |fl name,isdefault
It should show as below with True against the new Ex2013 version
On the old Exchange 2007/2010 server, use the command below to remove the old Default Offline Address Book
Remove-offlineaddressbook –identity “Default Offline Address List”
Associate mailbox databases with another default public folder database
You can’t actually do this – as in you can’t clear the Public folder Database field using PowerShell. Therefore you will need to use ADSIEdit. Firstly however, check out what the settings are using the command below.
Get-MailboxDatabase |fl Name,Pub*
Check the output and as you see below it shows that we’ve associated the public folder databases on the new server with a database on the old server
To resolve this situation, you need to use ADSIEdit.msc
Connect to the Configuration naming context as below
Expand the tree and navigate to CN=Services, CN=Microsoft Exchange, CN=(your organisation name), CN=Administrative Groups, CN=Exchange Administrative Group (FYDIBOHF23SPDLT), CN=Databases
You will see the databases in the middle pane. Right click the first one and select Properties
Scroll down until you locate the msExchHomePublicMDB attribute as below and select Edit
Select Clear and Ok – you should see the attribute cleared.
Repeat this process for all the Mailbox databases you have. It may take a few minutes for AD replication to send these changes to your other domain controllers.
Repeat the command below to verify that the changes are complete
Get-MailboxDatabase |fl Name,Pub*
Remove the public folder database
You will need to do this on the old Exchange 2007 / 2010 server
Remove-publicfolderdatabase “Public Folder Database”
This should remove the DB from Exchange and AD.
However if you have had Internet Newsgroups in your public folder database then you will find that you cannot remove it – you will instead get an error similar to below.
In that case – you will use ADSIEdit.msc to remove it.
Connect to the Configuration Naming context as you did earlier
Expand to CN=Services, CN=Microsoft Exchange, CN=your organization name, CN=Administrative Groups, CN=Exchange Administrative Group, CN=Servers, CN=Your MailBox Server, CN=Information Store.
Expand each node and locate the Public Folder Database as per the screenshot below
Right click on the Public Folder database and delete it.
Then navigate up the tree and delete the Second Storage Group container IF and ONLY IF the Public Folder Database was the only database inside that container.
Back to Normal
Once you’ve done this procedure then you may continue with your normal Exchange Migration and complete the other tasks needed before uninstalling the Exchange 2007/2010 server from the network.