In the United States, we celebrate Halloween on October 31. The point of Halloween varies depending on your age: for parents and young children, the holiday revolves mostly around extorting candy from neighbors. For many other people, Halloween is about scary creatures, such as mummies, space aliens, and zombies. Speaking of which, zombies are the topic of this week's UPDATE, so grab a candy bar and prepare to be scared. Imagine an episode of The Twilight Zone that goes something like this . . .

It was a dark and stormy night, but Joe Admin was warm and comfortable in his brightly lit office. "Just a few more minutes," thought Joe happily, "and I'll have removed this public folder store from my Exchange 2007 server—then I can go home!" A streak of lightning flashed outside the windows, and he could feel the distant low rumble of thunder vibrating through his feet. Alas, a strange sense of foreboding made Joe shiver as he opened Exchange Management Shell and typed the commands to remove his public folder database.

He pressed enter. Suddenly a shriek burst unbidden from Joe's mouth. "What do you MEAN there are still replicas?" he sputtered. "I removed all the replicas already!" Fade to black, cue The Twilight Zone theme.

Joe's just been bitten by a common misbehavior of Exchange Server 2007 RTM. It sometimes insists that there are replicas of a public folder in a public folder database, even when no replicas are visible. As far as I can tell, this is a bug, but knowing that doesn't help get rid of the replicas. I've run into this problem a few times in test environments built using beta versions of Exchange 2007, but my coworker and fellow Exchange MVP Devin Ganger recently ran into it when trying to remove the first Exchange 2007 server from an environment built using only the bare default settings.

Devin tried using Exchange Management Shell to find replicas. He entered these commands:

Get-PublicFolder \ -Recurse | ft Name,Replicas
Get-PublicFolder \NON_IPM_SUBTREE -Recurse | ft Name,Replicas

But he got no results, indicating that no replicas were present. However, his attempts to remove the public folder database came to naught, even after the standard tricks: Setting the mailbox databases to use a different public folder store; stopping, then restarting the Exchange Information Store service; and even rebooting the server had no effect.

However, another Exchange MVP, Ilse Van Criekinge, found a solution. The trick is to remove all the replicas from the default path, remove all folders from the NON_IPM_SUBTREE object, then remove the database itself. This sequence requires three separate Exchange Management Shell commands. To get rid of all replicas in the default path on the server named "EX2007," use the following command:

Get-PublicFolder -Server EX2007 "\" -Recurse -ResultSize:Unlimited |
Remove-PublicFolder -Server EX2007 -Recurse -ErrorAction:SilentlyContinue
-Confirm:$False

Note the ErrorAction and Confirm parameters, which are set to force removal, without confirmation, even if errors occur. Next, we do the same thing to the NON_IPM_SUBTREE folders:

Get-PublicFolder -Server EX2007 "Non_Ipm_Subtree" -Recurse
-ResultSize:Unlimited | Remove-PublicFolder -Server EX2007 -Recurse
-ErrorAction:SilentlyContinue -Confirm:$False

Now that all the replicas really are gone, we can remove the public folder database with this command:

Get-PublicFolderDatabase -Server ex2007 | Remove-PublicFolderDatabase
-RemoveLastAllowed

Note that this command assumes that you have only a single public folder database on the target server.

Why are all three steps necessary to remove a public folder database? At this point, I don't know; it appears that some system folder replicas aren't removed when you manually remove replicas. Microsoft is investigating this, so perhaps we'll see a fix for it before it's time to get out the Thanksgiving decorations. In the meantime, you can at least avoid starring in your own version of Invasion of the Public Folder Zombies. Actually, that's a Halloween movie I'd pay to watch!

End of Article




You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

Public Folder management is problematic. Very helpful article

konrad.sagala@pkobp.pl

Article Rating 5 out of 5

Thanks for letting us know what you think, and please do continue to let us know what topics you're interested in. Don't forget to check out the Related Articles section at the top right of the page for more articles on public folder management. Brian Winstead Assistant Editor bwinstead@windowsitpro.com

bkwin

Article Rating 5 out of 5

It shows again this exchange 2007 is a nasty beast. Lines of lines of commands just to remove some orphan replicas! Before, you fired only eseutil commands (to defrag and maintain the stores) in the command prompt. Now, you do all the things from the command prompt.

muraty

Article Rating 3 out of 5

Why bother to remove your public folders? Sharepoint is not ready to provide all the functionality that one can build into public folders with MAPI and (especially) CDO. Microsoft seem to have relented somewhat and extendes support deadlines and even put back some functionality into the GUI in SP1. Hang onto them and protest! I don't need Sharepoint. A ewll organised file server and public folders is all I need for most installations. My users don't want THREE methods of accessing their files. I don't wnat three server environements to support.

carol@smalldomain.ch

Article Rating 4 out of 5