Script Quickie: Copying Receive Connectors

Exchange Receive Connectors are individual to a particular server, which means if you want to have the same receive connector on a bunch of your Exchange servers, you've got some work to do!  Fortunately there's PowerShell to ease the burden.  With two simple commands you can create an identical receive connector on any other server.

First get the receive connector you are interested in:
$rec = Get-ReceiveConnector -Server SourceExchangeServer| where{$ -eq "Connector Name"}

Now use that variable to pull values for the new receive connector:
New-ReceiveConnector -Name $rec.Name `
-Usage 'Custom' `
-Bindings $rec.Bindings `
-Fqdn 'server name or shared name' `
-RemoteIPRanges $rec.RemoteIPRanges `
-Server 'TargetExchangeServer' `
-AuthMechanism $rec.AuthMechanism `
-DomainSecureEnabled $rec.DomainSecureEnabled `
-PermissionGroups $rec.PermissionGroups

Go Go magic of PowerShell!  You can add any other properties that might be relevant, but these will be enough to create the connector in the first place.  The fqdn property is the name the server will respond with from an EHLO or HELO request.  This could be the server's fqdn or it could be something like

You could definitely script this out a bit more to automate things, but for quick and dirty, not much beats two easy commands!

Labels: , , , , ,