Forum Discussion
Stefano Colombo
Feb 09, 2024Brass Contributor
Copy receive connectors
I'm migrating from Exchange 2010 to 2016 and I was looking for a way to copy all the Ex2010's Receive Connectors to Ex2016. I found a script on github that should do just that but it fails with the ...
Dan_Snape
Feb 12, 2024Steel Contributor
Not being very good a scripting, I tend to just use a one-liner for this:
New-ReceiveConnector <Relay name> -Server <server name> –AuthMechanism TLS,ExternalAuthoritative –PermissionGroups AnonymousUsers,ExchangeServers –MaxMessageSize 30MB –TransportRole FrontendTransport -RemoteIPRanges (Get-ReceiveConnector <existing receive connector ie: "ExchangeServer01\Anonymous Relay">).RemoteIPRanges -Bindings 0.0.0.0:25
There are a few properties you can configure as part of this.
New-ReceiveConnector <Relay name> -Server <server name> –AuthMechanism TLS,ExternalAuthoritative –PermissionGroups AnonymousUsers,ExchangeServers –MaxMessageSize 30MB –TransportRole FrontendTransport -RemoteIPRanges (Get-ReceiveConnector <existing receive connector ie: "ExchangeServer01\Anonymous Relay">).RemoteIPRanges -Bindings 0.0.0.0:25
There are a few properties you can configure as part of this.
Stefano Colombo
Feb 12, 2024Brass Contributor
Hello DAN,
Unfortunately this does not work, is exactly the same command that is included in the script provided by github community and same command I tried myself.
The problem is that, for whatever reason, the parameter -RemoteIPRanges is not accepting the input
-RemoteIPRanges (Get-ReceiveConnector "$SourceServer\GPRS").RemoteIPRanges
The error is always that the format of IP is not correct and cannot be converted.
So far I had to create a script that cycles for each connector's remote IP ranges and ADD them to the new connector once created.
Unfortunately this does not work, is exactly the same command that is included in the script provided by github community and same command I tried myself.
The problem is that, for whatever reason, the parameter -RemoteIPRanges is not accepting the input
-RemoteIPRanges (Get-ReceiveConnector "$SourceServer\GPRS").RemoteIPRanges
The error is always that the format of IP is not correct and cannot be converted.
So far I had to create a script that cycles for each connector's remote IP ranges and ADD them to the new connector once created.
- Dan_SnapeFeb 21, 2024Steel ContributorI just tested this myself. The existing environment is Exchange Server 2010. I installed a new Exchange Server 2016 server and ran this cmdlet and it created the new receive connector and copied the IP addresses from an Exchange Server 2010 server without issue. It must be something specific to your environment. Did you run the cmdlet from the Exchange Server 2016 server?