I am completely sick of the sight of this error:
WARNING: Object \public folder path   has been corrupted and it is in an inconsistent state. The following validation errors have occurred:
WARNING: The Name property contains leading or trailing whitespace, which must be removed.
So here’s powershell script to find and rename the offending folders. (Why exactly Outlook allows people to name them with a space at the end I DO NOT KNOW!)
$getpfcmd = "get-publicfolder -Recurse -resultsize unlimited" invoke-expression $getpfcmd | foreach { if ($_.Name -ne $null -and $_.Name.substring($_.Name.length - 1,1) -eq " ") { write-host $_.Name $newname = $_.Name.Trim() $pfid = $_.identity.MapiEntryId.tostring() Set-PublicFolder -Identity $pfid -Name $newname } }
Â
I empathize completely 🙂 Working with Public Folders is kludgy on the best of days. I wish they would disappear but their death has been foretold too many times for me to believe it will happen soon.
Patrick