Microsoft has made it pretty clear in recent years that public folders will be going away at some stage in the future of Exchange Server.
If you’ve been using public folders in your Exchange organization and decided to get rid of them completely then you may run into this particular issue.
In this scenario I have gone ahead and prepared to remove the public folder database by:
- Removing all of the public folder content
- Ensured OAB distribution is set to web only
- Ensured all my clients are Outlook 2007 and above
When I attempt to remove the public folder database I receive this error.
The public folder database ‘PF-BR-01’ cannot be deleted.
PF-BR-01
Failed
Error:
Public folder database “PF-BR-01” is the default public folder database for the following mailbox database(s):
MB-BR-01
. Before deleting the public folder database, assign a new default public folder database to the mailbox database(s).
The solution seems logical. All I need to do is modify that mailbox database so it no longer uses the public folder database.
It is simple enough to change the public folder database configured for a mailbox database to some other public folder database, but in this situation I’m trying to get rid of public folders entirely. So instead I want to set the mailbox database to have no default public folder database.
Here is what happens if I try to use Set-MailboxDatabase to set the value to $null.
[PS] C:\>Set-MailboxDatabase MB-BR-01 -PublicFolderDatabase $null Cannot validate argument on parameter 'PublicFolderDatabase'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again. + CategoryInfo : InvalidData: (:) [Set-MailboxDatabase], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Set-MailboxDatabase
It doesn’t work. However all is not lost, there is another way, using ADSIEdit.msc.
Open ADSIEdit.msc and connect to the Configuration naming context.
Navigate to the container that holds the Exchange databases. For Exchange 2010 you’ll find this in CN=Services -> CN=Microsoft Exchange -> CN=(your organization name) -> CN=Administrative Groups -> CN=Exchange Administrative Group (FYDIBOHF23SPDLT) -> CN=Databases.
Right-click the mailbox database you want to remove the default public folder database from and choose Properties.
Scroll down until you find the msExchHomePublicMDB attribute. Highlight it and then click Edit.
Click the Clear button so that the value changes to “not set”.
Click OK, and OK again to commit the change.
Depending on the size of your network you may need to wait for that change to replicate throughout your Active Directory.
When you try to remove the public folder database again you should find that it now removes without error.
For anyone who has a lot of databases you can achieve this via PS and the AD PS Module, caveating test as appropriate.
$PFHomePublicMDB = Get-ADObject -SearchBase “CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=,DC=com” -Filter * -Properties msExchHomePublicMDB | ? { $_.msExchHomePublicMDB -match “” }
foreach ($DB in $PFHomePublicMDB)
{
Set-ADObject -Identity $DB.DistinguishedName -Clear msExchHomePublicMDB
}
Looks like the variable got trucated, trying again:
$PFHomePublicMDB = Get-ADObject -SearchBase “CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=,DC=com” -Filter * -Properties msExchHomePublicMDB | ? { $_.msExchHomePublicMDB -match “” }
foreach ($DB in $PFHomePublicMDB)
{
Set-ADObject -Identity $DB.DistinguishedName -Clear msExchHomePublicMDB
}
And again, odd given it shows correctly in the comments fields before I submit!
Please define a criteria in between the quotes after the match operator e.g.
? { $_.msExchHomePublicMDB -match “EMEA” }
I migrated our Public Folders from 2010 to 2016. I deleted the 2010 DBs that housed the Public Folders, but I still see that all my 2016 DBs have the deleted DB as the “msExchHomePublicMDB” at the deleted location. Is this something I should clear out, or manually point to the new DB that houses the PF mailboxes?
HI,
I have migrated from Exchange 2013 to 2016..
Everything went fine and I uninstalled EX2013
now I am having 2 Issues..
1) Outlook users still asked for Password to Public folders…. Which were on 2013 and we took a backup and removed the DB and EX2013
2) When in EX2016 ECP we get error on all users ” Database is mandatory on UserMailbox”
I have Deleted and Recreated all Support Mailboxes, Federation, Arbitration, Health etc…
Used ADSI to check if any traits of DB or Publicfolders is there but there is none present…
Still no luck… Can you please guide me on what should I Do to make my ECP work and PF_Folder mailbox to stop connecting to Outlook.
Thanks,
Exchange 2013 didn’t have a public folder database, so either I’ve misunderstood your first point or you mean something different.
I’d suggest opening a support case with Microsoft so they can guide you on a solution. Without seeing your environment and understanding how you got into this situation I can’t give you advice.
Thanks for your reply…
I mean to say that I have removed PFolders which was having mailbox as PF_Mailbox I have removed both the Mailbox and PublicFolders from EX2013 and uninstalled EX2013.
My BIG issue currently is ” Database is mandatory on UserMailbox” as cant create new users and can edit current users…
Thanks
HI,
I deleted all objects which were of TYPE “Public folder” In Active directory Users & Computers >> Microsoft Exchange System Objects>>
The issue of PF_Mailbox is now resolved… I hope so… still its under observation…
But “Database is mandatory on UserMailbox.” is still persistent and causing big annoyance.. any command run against any mailbox throws this error “Database is mandatory on UserMailbox.” and practically only mails are working and cand do any admin tasks on it.
Thanks,
Hi,
Finally got it all sorted… The PF_Mailbox named disabled user was there on which prevent from deletion flag was set and uninstalling Exchange2013 couldn’t remove it. I had to Uncheck it and delete the user.. After that I restarted the information Store service and now everything is working perfectly fine.
Thanks
Paul: I’m running all EX2K13 in a DAG environment, and have this attribute on each DB in the DAG. Can I safely clear the “msExchHomePublicMDB” from the DBs with ADSIEdit, or do I have to point them to the Public Folder Mailbox which now holds the PFs?
Thanks for your help, always appreciate your responses.
Shouldn’t be necessary to touch it at all for Exchange 2013.
Hi Paul,
Can you remove publicfolders from exchange 2007 without it causing any issues or do you need to keep a replica, not sure as we do not use public folders within the company and all clients are 2010 or 2013.
Look forward to hearing from you .
If your clients are all 2010 or later then PFs are not mandatory (they used to be used for free/busy lookups etc for 2003 clients). So if you have no PF content, then yes you can get rid of PFs entirely and enjoy a PF free life.
Pingback: Exchange 2007 to 2013 migration – A random blog from a sysadmin
Four and a half years later is post is still saving people. Thanks Paul!!
I came here by way of the dreaded post Exchange 2007 decommission “Microsoft Exchange administrator has made a change that requires you quit and restart Outlook” at the blog by Andrew S Higginbotham.
Paul’s direct and concise removal instructions saved me the pain and suffering of facing 1000+ Monday Morning Outlook 2013 users wrath.
Pingback: Outlook clients repeatedly disconnect from and reconnect to Exchange Server 2013 | System Admins
You mentioned you did this:
“Ensured OAB distribution is set to web only”
I have web distribution enabled but if you attempt to deselect a client type it does generate an error. Or does enabling web based distribution actually set it to web only? I do notice in the OAB GUI in the MMC it says “distribution method: web-based”.
What’s the error?
Chris,
this would remove the default public folder of a specific database. This procedure would remove whatever version of public folder you are using, so only follow this approach if you are wanting to manually remove the public folder. Of course you can also re-add the correct public folder back to the database if you need to.
If you’re on Exchange 2013 and using Public Folders on 2013, does clearing this break anything?
Does it need to have the CN of the new PF mailbox?
Or is this a legacy property that can be cleared like the article mentions?
Thanks,
Chris
Hi Paul,
Do you have a similar procedure, how to do this in Exchange 2013 ? We would like to remove Public Folder access from certain users in E2013, but cannot figure out how to do it on the user mailboxes.
Thanks
Jens
Hi Paul,
When I clear the property and click on apply, get the following error:
Operation failed: Error code: 0x57
The parameter is incorrect.
00000057: LdapErr: DSIS-0C090B8A, comment: Error in attribute conversion operation, data, 0, v1db1
any idea?
Nevermind…. I found out what I did wrong. Instead of pressing the button “clear” is just cleared the field manually using the delete on the keyboard. If you then press OK and Apply, it will generate that error.
Regards,
Erik
This solved the problem for me. Thanks! I had correctly removed the public folder from one server when setting up my new Exchange 2013 server. I then added another and set up a DAG. Never occurred to me I’d need to deal with the public folder on the second server — just assumed it copied from the first and the Outlook errors related to some sort of weird hopping back and forth between the 2 DAG servers. Nope, it was exactly this. Thanks!!!
I hope my posting about the DAG issue helps someone with similar problems find this page more quickly than I did — took me a couple of days to find this post.
Pingback: [PublicFolderDatabase] is pointing to the Deleted Objects container in AD | Trials of a Network Admin
Thanks Paul
your article pointed me in the right direction.
Regards,
Navz
South Africa
Paul,
This is exactly what I need, but in Exchange 2007. I don’t don’t see a CN=Databases at all under the Administrative Group (FYDIBOHF23SPDLT) folder.
Can you tell me how to accomplish the above on Exchange 2007?
Ok it works.
I read again your instructions.
You said: “Right-click the mailbox database you want to remove the default public folder database from and choose Properties.”
I was right-clicking the Public folder database folder; not the mailbox database folder!
My mistake!
Thx,
Alex
(I will try your procedure next week-end)
OK I cannot find your the attrribute above in the ASDIEdit screen, There is no msExchHomePublicMDB attribute in my settings?
The attribute doesn’t exist at all? You’re looking at the properties of a mailbox database correct?
I found the HomePublic attribute in the DB of the AM-SVR-01 and unset it….but now I’m getting flack from the oldest Exch2003 Svr and there is no CN=Databases for the 2003 svr, it must be due to the Info store of that server not allowing to be mounted….I need to completely remove the 2003 and the extra 2010 svr from my Org, I had the services for Exchange 2003 and the 2nd Exch2010 disabled for the last 6-8 months with no ill effects but I want to scrub these servers and repurpose….What’s the best plan for this?
Mailbox Role Prerequisites
Failed
Error:
Uninstall cannot continue. Database ‘Public Folder Database 0476590657’: Public folder database “Public Folder Database 0476590657” is the default public folder database for the following mailbox database(s):
EX-SRV-02First Storage GroupMailbox Store (EX-SRV-02)
EX-SRV-02Recovery Storage GroupMailbox Store (EX-SRV-02)
Mailbox Database 1111599868
Same. This attribute doesn’t exist Paul.
In ADSIEdit make sure you’re opening the properties of the database object CN= with the icon that looks like a folder, and double-check that the Filter is not set to something that may be hiding it.
If you’re looking at the properties of the CN= object within that folder, that has an icon that looks like a sheet of notepad paper, that is the wrong object and it doesn’t have that attribute.
Thank you so much! A similar problem had been driving me nuts and your blog post plus this comment helped me resolve it. Great stuff.
One other attribute to remove in order to cleanup the exchange topology is this…
Navigate to the container that holds the Exchange administrative groups. For Exchange 2010 you’ll find this in CN=Services -> CN=Microsoft Exchange -> CN=(your organization name) -> CN=Administrative Groups
Right-click the administrative group CN=Exchange Administrative Group (FYDIBOHF23SPDLT) and choose Properties.
Scroll down until you find the siteFolderServer attribute.
Highlight it and then click Edit.
Click the Clear button so that the value changes to “not set”.
Wanted to confirm about the need to add replicas for system public folders (Free Busy, Organizational Forms, etc) when a) there are no Outlook 2003 clients, b) OAB distribution is set to web only and c) mixed environment that includes mailboxes hosted on Exchange 2003, 2007 and 2010 (across multiple regions).
Our HQ Office is migrating to Exchange 2010 with Outlook 2007, they have a dedicated PF Server hosting a PF database, they have added replicas for the Top Level Folder.
Our Office in APAC is also migrating to Exchange 2010 with Outlook 2007 clients, with the difference that we wont host a PF database locally but we will point our databases to the instance in the HQ Office (I know, not ideal but I just dont see the need to host a local copy when we are migrating PF content to Sharepoint).
With this in mind, I have performed tests to ensure services such as Availability, OOF, OAB, etc work from mailboxes hosted on Exchange 2003 and Exchange 2010. All seems to work just fine but we have the question about whether or not a replica of the System PF is neccesary on the Exchange 2010.
From my readings, this was only needed if you were migrating from EX2003 to EX2010 to allow services to be available during migration period or if you were to support Outlook 2003 on your EX2010 environment.
Any comments will be highly appreciated.
Thanks
So my understanding is that an Exchange 2003 mailbox user will query the Exchange 2003 PF for free/busy information regardless of their Outlook version.
Therefore, without a replica of free/busy information from the 2010 mailbox users via PF replication, the Exchange 2003 mailbox users won’t be able to see it.
Thats my understanding. If you’ve got a testing regime that proved otherwise I won’t argue with that 🙂
With Exchange 2010, Microsoft has done away with the standard of a default Public Folder database. During installation of Exchange 2010, one of the first questions it will ask is if your organization has any Outlook 2003 clients. If you choose No, Exchange will not create a PF. The reason is because if your organization is running Outlook versions 2003 and prior, they would require a PF.
In today’s world, SharePoint 2010 is the way to go if you need calendar/contact collaboration. And since SharePoint Foundation is free for small companies, it only makes sense to not use a PF and install SharePoint Foundation.
Microsoft keep saying they are doing away with Public Folders, do you think they will actually carry through on that ?
One day yes.
You may have noticed there there has been virtually no meaningful development of the capabilities or functionality of public folders for the last 3 versions of Exchange Server.
The real issue to me at the moment is that they don’t present a clear, simple alternative with good tools for making the change. Until they do, and as long as enough big customers are still demanding public folder’s be a feature of Exchange, then I don’t think it will happen. But I’d hate to be caught unprepared when they do finally pull the plug 😉
Pingback: Como remover a Public Folder padrao de uma Exchange Database « Rodrigo Rodrigues .:. www.andersonpatricio.org