Solved

cannot add public folder replica partners via script

Posted on 2009-05-19
1
719 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In-place Upgrading Dirsync to Azure AD Connect
In this video we show how to create an Address List 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 Organization >> Ad…
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…

730 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