how to add/remove replicas to/from a public folder's REPLICAS multivalue property.
I try to use below EMS command to replicate \somePFfolder to Ex201-PFDatabase:
Set-PublicFolder -identify '\somePFfolder' -replicas @{Add=Ex2010-PFDatabase1}
And I got this error:
Cannot process argument transformation on parameter 'Replicas'. Cannot convert the "System.Collections.Hashtable" value
of type "System.Collections.Hashtable" to type "Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter[]".
+ CategoryInfo : InvalidData: (:) [Set-PublicFolder], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-PublicFolder
Can somebody help me to correct the parameter type conversion error?
thanks
May 17th, 2012 3:32pm
Hi,
I find it easier to use the PF Scrips that are available in the Scripts folder. To add a server as replica you could use this syntax:
.\AddReplicaToPFRecursive.ps1 -TopPublicFolder \somePFfolder -ServerToAdd SERVER2
...cause when using Set-PublicFolder it would be to easy to replace the server/public folder database, instead of just adding a replica.
So if you want to add PFDatabase1 to a folder that already have PFDatabase2 set, the command would be:
Set-PublicFolder \somePFfolder -Replicas "PFDatabase1","PFDatabase2"
Scripts for Managing Public Folders in the Exchange Management Shell
http://technet.microsoft.com/en-us/library/aa998596.aspxMartina Miskovic
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2012 4:06pm
addreplicatopfrecursive won't work for me, I am not trying to replicate a folder or the entire tree. Just selected folders where Server-A has replica to another public folder mailstore in Server-B.
I suppose moveallreplicas.ps1 can do the job but I heard it is best and safer to replicate the hirecachy and content first instead of using ONLY moveallreplicas.ps1. Is that right?
Regardless, I still like to learn how to correct the TYPE error.
May 17th, 2012 8:51pm
addreplicatopfrecursive won't work for me, I am not trying to replicate a folder or the entire tree. Just selected folders where Server-A has replica to another public folder mailstore in Server-B.
I suppose moveallreplicas.ps1 can do the job but I heard it is best and safer to replicate the hirecachy and content first instead of using ONLY moveallreplicas.ps1. Is that right?
Regardless, I still like to learn how to correct the TYPE error.
Hi,
I don't recommend using moveallreplicas. At least not if you are planning to live in a a coexistance for a while and having a lot a Public Folders, so yes it's better not to use that script. The hierarchy will replicate without the need to do anyting.
For some cmdlets, it's not possible to modify multivalued properties with @{Add=Somevalue} and Set-Publicfolders is one of them.
I often use
EXFolders to set up/remove PF Replicas or .\AddReplicaToPFRecursive.ps1 server SOURCE TopPublicFolder \" ServertoAdd TARGET
(if there's not too much data, cause that could create an "replication storm" and would affect normal email delivery in a bad way.
Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2012 2:50am
Hi Andy,
Is there any update?Fiona Liao
TechNet Community Support
May 23rd, 2012 3:57am