Skip to content

Instantly share code, notes, and snippets.

@andreagx
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save andreagx/bbf08e65ce059ab64c91 to your computer and use it in GitHub Desktop.

Select an option

Save andreagx/bbf08e65ce059ab64c91 to your computer and use it in GitHub Desktop.
function TransferReceiveConnectors {
$SourceServer = "Exchange_Source"
$DestinationServer = "Exchange_Dest"
$SourceReceiveConnector = ForEach-Object {Get-ReceiveConnector -Server $SourceServer}
ForEach ($Connector in $SourceReceiveConnector)
{
New-ReceiveConnector -Name $Connector.Name -Server $DestinationServer -Bindings $Connector.Bindings -AuthMechanism $Connector.AuthMechanism -PermissionGroups $Connector.PermissionGroups -RemoteIPRanges $Connector.RemoteIPRanges
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment