Exchange 2007/2010 Public Folder Store in an Inconsistent State

In Exchange Server 2007 or 2010 you may encounter an error that the public folder store is corrupted and is in an inconsistent state.

The following warning(s) were reported while loading topology information:

get-PublicFolderDatabase
Completed

Warning:
Object EX2007PF1\EX2007PF1_SG1\Public Folder Store (EX2007PF1) has been corrupted and it is in an inconsistent state. The following validation errors have occurred:

Warning:
The item “fbd8a0c6-8083-4175-915c-6842e6408af6″ in public folder referral does not reference an existing server.

In this particular case the problem was a server in the public folder referral list that no longer existed. This could be seen by inspecting the CustomReferralServerList attribute of the public folder database.

[PS] C:\>$list = (Get-PublicFolderDatabase -server EX2007pf1).customreferralserverlist

[PS] C:\>$list

ServerName          ServerGuid                         Cost Name
----------          ----------                         ---- ----
SYDEXPF1         3b1789ed-8d9b-43...                  10 SYDEXPF1:10
MELEXPF1          7521739a-6dc1-41...                  10 MELEXPF1:10
ADLEXPF1         5ce9557a-8e70-41...                  40 ADLEXPF1:40
                    fbd8a0c6-8083-41...                  90 {fbd8a0c6-8083-4...
EX2007PF2         8e074cb6-6170-46...                  25 EX2007PF2:25

Note the missing entry in the ServerName column above, though the ServerGuid, Cost, and Name were still populated.

But because the ServerName attribute was empty, removing the entry from the list could not be done by referencing it as the necessary pair of values (ie ServerName:Cost).

Fortunately PowerShell 2.0 makes it possible to remove an entry from an array by referencing it by number, using the RemoveAt method.

The first entry in an array is 0, so the fourth entry is 3.

[PS] C:\>$list.RemoveAt(3)

The array now has the invalid attribute removed.

[PS] C:\>$list

ServerName          ServerGuid                         Cost Name
----------          ----------                         ---- ----
SYDEXPF1         3b1789ed-8d9b-43...                  10 SYDEXPF1:10
MELEXPF1          7521739a-6dc1-41...                  10 MELEXPF1:10
ADLEXPF1         5ce9557a-8e70-41...                  40 ADLEXPF1:40
EX2007PF2         8e074cb6-6170-46...                  25 EX2007PF2:25

The final step is to update the public folder database with the new value.

[PS] C:\>Set-PublicFolderDatabase "EX2007PF1\Public Folder Store (EX2007PF1)" -CustomReferralServerList $list

This may take some time to replicate throughout your Active Directory, after which the public folder database should no longer report the inconsistent state.

About Paul Cunningham

Paul is a Microsoft Exchange Server MVP and publisher of Exchange Server Pro. He also holds several Microsoft certifications including for Exchange Server 2007, 2010 and 2013. Connect with Paul on Twitter and Google+.

Comments

  1. Please is there a way to from to remove from powershell ver1

Leave a Comment

*

We are an Authorized DigiCert™ SSL Partner.
Loading...

Still running Exchange 2003? Time to get moving and start your upgrade. Find out how - Click Here