Solved

cannot add public folder replica partners via script

Posted on 2009-05-19
1
713 Views
Last Modified: 2012-05-07
we have a wide and varied public folder heirarchy due to operational requirements.
to migrate the public folder data to exchange 2007 - we need to migrate it per site/database
we cannot use the existing exchange scripts that assume we can add replica partners to the folder heirarchy
we need to add a public folder replica partner to every replica on a specific servers database
i have pillaged the microsoft \scripts folder to generate such a script.
Param(
                [string] $Server,
                [string] $ServerToAdd= ""
)
$dbAdd = get-publicfolderdatabase -server $ServerToAdd -erroraction Stop
get-publicfolder \ -Recurse | ?{$_.Replicas -like "*LABSRV02*"} | ForEACH {
                If (!$_.Replicas.Contains($dbadd.identity)) {
                                $_.Replicas += $dbadd.Identity;
                }
                $_ | set-publicfolder -server $_.originatingServer;

}
in the lab (one ex2003 PF DB, One e12 PF DB) we can run the above script and it will add the replica partner of e12 server to each public folder on ex2003 server db.

however in preprod - we have  an expanded lab, which has multiple ex2003 servers with PF dbs and two exchange 2007 servers with a single DB
when running the same script - it will not add any e12 replica partner server pf db to the target 2003 server hosted public folders.  the script runs with out error.
can anyone shed any light?
Param(

                [string] $Server,

                [string] $ServerToAdd= ""

)

$dbAdd = get-publicfolderdatabase -server $ServerToAdd -erroraction Stop

get-publicfolder \ -Recurse | ?{$_.Replicas -like "*LABSRV02*"} | ForEACH {

                If (!$_.Replicas.Contains($dbadd.identity)) {

                                $_.Replicas += $dbadd.Identity;

                }

                $_ | set-publicfolder -server $_.originatingServer;

 

}

Open in new window

0
Comment
Question by:bakerm00
1 Comment
 
LVL 3

Accepted Solution

by:
bakerm00 earned 0 total points
ID: 24432610
Extra * in ?{$_.Replicas -like ""}
closing.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
This video discusses moving either the default database or any database to a new volume.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now