If you are familiar with Microsoft Exchange 2007 you already know about the AddReplicaToPFRecursive.ps1 script that can be found in the “X:\Program Files\Microsoft\Exchange Server\Scripts”, however this script has a bug it doesn’t look to support public folders which names contains spaces.
It is quite common to enclose parameters that contains spaces with “quotations” but that doesn’t work here.
If you simply try to use the following it will fail.
AddReplicatoPFRecursive.ps1 -TopPublicFolder “\PublicFolder with space” -ServerToAdd “servername”
The solution turned out to be to use single quotes inside the double quotes so it should be something like
AddReplicatoPFRecursive.ps1 -TopPublicFolder “'\PublicFolder with space'” -ServerToAdd “servername”
That’s really weird and not standard but it works !