Solved

cannot add public folder replica partners via script

Posted on 2009-05-19
1
710 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
Comment Utility
Extra * in ?{$_.Replicas -like ""}
closing.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

762 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

7 Experts available now in Live!

Get 1:1 Help Now