Exchange 2007 Public Folder Move or Removal

Well I goofed - I added a public folder store to the same exchange storage group and when I went to implement SCR said "No Can Do" since the mailbox database and the public folder database is in the same storage group.  The public folders are on the prior 2003 Exchange servers and a second 2007 exchange server.  (I did the console command to move the public folders over to the second exchange server and after that manually replicated the 2003 folders to the second 2007 server.  I did NOT manually replicate the 2003 public folders to the primary/first Exchange 2007 box, but they are listed there. When I delete any folder from the Exchange 2007 box it deletes it from all the boxes.  I am trying to AVOID copying the public folders to a local folder, deleting all the public folders and then deleting the public folder store then moving them back to a new public folder store (since that will likely require reassigning permissions to each folder and taking the folders offline.)  So what I am looking for is a method to
A: remove the public folders from only the primary 2007 server (found these commands on EE - Get-PublicFolder -Server HNLEX04 "\" -Recurse -ResultSize:Unlimited Remove-PublicFolder -Server HNLEX04 -Recurse -ErrorAction:SilentlyContinue

Get-PublicFolder -Server HNLEX04 "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited Remove-PublicFolder -Server HNLEX04 -Recurse -ErrorAction:SilentlyContinue
B: Find a way to move the public folder database to another storage group on the same server (can't have 2 public folder databases on the server at the same time.)

Who is Participating?
sfeder11554Author Commented:
I resolved the issue myself in the following manner -

First I disabled the replication schedule on the public folders - set it to none just ensure that changes on the 2007 would not be replicated to another Exchange server.  (I also made .pst files of the folders as a precaution).  I did not test to see if the commands I used below would wipe out public folders on other machines because of this setting.

The commands are not stated correctly- they are usually printed on 2 lines instead of 4 lines- there are really 4 seperate commands (I only ran the first 2 since I did not intend to permamently remove the public folder just create a new storage group and put the database there.)  Running them in one line created a parameters error-

In the shell command

1.  Get-PublicFolder -Server [server-name] "\" -Recurse -ResultSize:Unlimited
(This will give you the name of the database for item # 3).

2.  Remove-PublicFolder -Server [server-name] -Recurse -ErrorAction:SilentlyContinue

3.  You will then be prompted:
Remove pipeline id  [provide information from part 1]

This removed the public folders database in the storage group.

Similarly for the remainder of the public folder storage I would presume that the commands should be broken down like this -(I did not run these)

Get-PublicFolder -Server [server-name] "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited

Remove-PublicFolder -Server [server-name] -Recurse -ErrorAction:SilentlyContinue

BE AWARE THAT IF YOU RECREATE A PUBLIC FOLDER STORE AND DATABASE IT WILL NOT BE IMMEDIATELY AVAILABLE FOR REPLICATION EVEN THOUGH IT WILL BE LISTED ON ANOTHER EXCHANGE SERVER - I found that it will tell you that the database no longer exists.  Later on I found that it had automatically replicated and I set it for replication on another Exchange (2003) box.

On Exchange 2007 on mailbox server role server can have only one pubic folder store. This is by design.

sfeder11554Author Commented:
Yes I understand that - to simplify the questions:

Will the commands I put in the question above remove the public folder from only the server specified or will it carry through to the other servers by removing it on the one?

Although you can only have 1 public folder database is there a method to create another storage container and move that database to the new container (as opposed to just changing the path)?


Instead you could perform the move all replicas to move the replica off the current server and then you can remove the public folder store.

If you perform the above command it would mark the public folders to be deleted and would delete all the public folders from both the server.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.