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.
Overview
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.
Procedure
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.
Darren says
Thank you, thank you, thank you!!!
I was beating my head against a brick wall trying to remove our old Exch2007 Public Folders and your info worked flawlessly.
And again thank you!
Chris says
Thanks a lot for this awesome guide to remove public folder association. We just migrated from 2010 to 2016 and we’re not using and did not want public folders. When I noticed the new dbs had linked to the old public folders on 2010 I was stumped as to how to clear this connection via power shell. Thanks for the adsi info, saved me a lot of time.
Ifrah Haviv says
Hi Chris,
In your migration process, the fact that the outlook connects to the 2010 public folder causes the password prompt on client outlook? Does it solved that issue?
Thanks,
Ifrah
Wayne Small says
Yes Ifrah – this should resolve that problem for you.
Ifrah says
Thanks!
just to be on safe side, first i need to migrate all mailboxes to the new 2016 server and then to remove public folders from the old 2010 server?
i have public folder DB that i am not using at all but still all my 2010 databases are associated with that PF.
so after all mailbox migration is will be safe to just remove it as your article describe?
Thanks again!
Ifrah.
Bino says
Thank you dear this post help me.
Röhner, Sebastian says
Vielen Dank,
bei mir war es noch schlimmer, ein Windows Server 2003 ohne PowerShell 2.0 und Exchange 2007. Hier ist ein Update auf PowerShell 2.0 nicht so einfach möglich, man solle angeblich alle Exchange Dienste beenden, PowerShell 1.0 deinstallieren, PowerShell 2.0 installieren und dann Exchange wieder starten. Und dann sollen die Public Folder Skripte fkt. -> Da der Kunde aber keine öffentlichen Ordner besitzt, werde ich die manuelle Entfernung durchführen, danke für den Leitfaden!
Wayne Small says
Vielen Dank für Ihre Kommentare. Du hast recht, es ist nicht leicht zu reparieren. Ich bin froh, dass dieser Artikel hilft Ihnen, das Problem zu lösen.
Ashhh says
Hi,
I am in pursuit of transition of ex2010 to 2016,and i dont want to migrate the public folder DB as we are not using it and it has been in dismount state.Can i remove the default PF database before i will start the transition.Is this safe or will it have any adverse effect.
Regards