Monday, August 8, 2011

Move Public Folders All replica to Exchange 2010 Server PS Script

If you are in the middle of migration and it is time to move all PF folder replicas from Exchange 2007 to Exchange 2010 server PS is your friend.

Lets say your Existing Exchange 2007 Server name is EXC07 and you want to move all PF replicas to newly build Exchange 2010 Server called EXC210 , you can use fallowing PS commands…..

Connect to your Exchange Server , open EMS
image
Navigate fallowing directory from PS command line
[PS] E:\Program Files\Microsoft\Exchange Server\V14\Scripts>
  • AddReplicaToPFRecursive.ps1
  • RemoveReplicaFromPFRecursive.ps1
  • ReplaceReplicaOnPFRecursive.ps1
  • MoveAllReplicas.ps1
image
Now we are ready to execute existing scripts sits on this directory. All PF replicas sits on the server called “EXC07” and I like to add Exchange 2010 Server called “EXC210 into PF replica  folders as second server.


.\AddReplicaToPFRecursive.ps1 –Server EXC210 –TopPublicFolder \ –ServerToAdd “EXC07”

image
Remove Replica  ( pay attention  Exchange  server must have all of its public folder replicas removed before it can be decommissioned…. )

.\RemoveReplicaToPFRecursive.ps1 –Server EXC210 –TopPublicFolder \ –ServerToRemove “EXC07”

  • Now System folders

.\AddReplicaToPFRecursive.ps1 -TopPublicFolder "\NON_IPM_Subtree" ServerToAdd
"EXC210"

image
  • To view a list of the replicas in the public folder hierarchy

Get-PublicFolder -recurse |fl name,replicas

  • Move all replicas from EXCH07 to EXC210

MoveAllReplicas.ps1 –Server EXC07 –NewServer EXC210

  • For System Folders

Get-PublicFolder -recurse \non_ipm_subtree |fl name, replicas

  • To compare content replicated between the source and destination servers

Get-PublicFolderStatistics | FL

  • Also

Get-PublicFolderStatistics –Server ServerA

  • Compare Output to ServerB

Get-PublicFolderStatistics –Server ServerA


 Resources:

2 comments:

  1. Hi all,

    For most organizations migrating to public folder is as simple as moving replicas from one server to another. You can use ps scripts that are installed with Microsoft's exchange server 2010, or you can write your own scripts. Public folder replicas can also be moved using the exchange management Shell. Thank you...

    Server Audit

    ReplyDelete
  2. Hi Dude,

    Public folders are folders that all users on the network can access provided they are given permission by the mail administrator or owner of the public folder. These folders should be used to store messages that may be of interest to all users. Thanks for sharing it.......

    Exchange Folder

    ReplyDelete