DiscoPosse – Using the chicken to measure IT
Technology, Cycling, Music and Madness


Technology

April 21, 2012

PowerShell – Copy Exchange 2010 Receive Connectors Between Servers

More articles by »
Written by: Eric
Tags: , , , , ,

The situation that many Exchange administrators are in, is a simple one. Multiple CAS servers for redundancy and fault tolerance, as well as load balancing either inside the cluster, or on the outside using something like a Citrix Netscaler or F5 device. This is a natural design for Exchange 2010 and provides great functionality and recovery capability.

There are also many designs which use a single server, or perhaps a single server per site contains Receive Connectors for inbound relay based on a set of criteria such as auth type or network range.

The challenge for Receive Connectors, and especially with network ranges applied, is that they are difficult to re-create on another server. Whether it is on your first creation, or if you want to make a copy on another server for active or passive use, PowerShell can be your best friend for this task.

Assuming that we have two servers named EXSITE1 and EXSITE2 where we have created our Receive Connector named Default-App-Connector on EXSITE1 but we want to have it on EXSITE2. While we can create one easily enough using the New-ReceiveConnector CmdLet we have to type in all of the IP ranges manually which is both tedious and error prone.

Here is your solution. The basic command for creating the new backup connector is:

New-ReceiveConnector “Default-App-Connector” -Server EXSITE2 -Bindings 0.0.0.0:25

The problem is that this only creates the connector, but not the IP ranges. As I mentioned, if we type the allowed IP addresses and ranges into the command using the -RemoteIPRanges parameter I have a lot of work ahead of me.

So we simply read the -RemoteIPRanges from the first connector and pass them to the New-ReceiveConnector CmdLet just like so:

New-ReceiveConnector “Default-App-Connector” -Server EXSITE2 -Bindings 0.0.0.0:25 -RemoteIPRanges ( Get-ReceiveConnector “EXSITE1\Default-App-Connector” ).RemoteIPRanges

You can also use the Get-ReceiveConnector to document your configuration to file, which is a good practice for BCP. Because these can be volatile, I recommend you export to disk, or replicate to the second server weekly or monthly.

Simply use this command:

Get-ReceiveConnector “EXSITE1\Default-App-Connector” | Format-List | Out-File “X:\ExchangeConfiguration\Default-App-Connector.txt”

It’s just that easy. A simple command that can provide peace of mind and protection. Hopefully you find this to be helpful.

 



About the Author

Eric





 
 

 
featured_powershell

Updating (same as parent folder) records with DNSCMD and PowerShell

In an earlier post on the site (Microsoft DNS record updates using PowerShell and DNSCMD) I noted how PowerShell cannot natively update records in MS DNS, however we could leverage the DNSCMD command and pass parameters using a...
by Eric
1

 
 
DT-discoposse

Welcome Vision Solutions to the DiscoPosse family!

As a long time customer of the Double-Take product family, I’m proud to announce that Vision Solutions is joining the ranks as a sponsor for DiscoPosse.com. For those who haven’t already been exposed to Vision Solut...
by Eric
0

 
 
featured_powershell

CSV, yeah you know me! – PowerShell and the Import-Csv CmdLet – Part 3

This was a long overdue post, so thanks for sticking with me while I finally got back on track with our CSV, yeah you know me series (Here are Part 1 and Part 2). As I’d mentioned in the closing of Part 2, we want to be a...
by Eric
0

 

 
tovmug

Toronto VMUG: November 6th Event Recap

It was another great VMUG session at the November 6th half-day Toronto VMUG at the Metro Toronto Convention Centre. It turned out to be a Toronto VMUG first with a remote presenter as a result of some of the aftermath of hurric...
by Eric
0

 
 
featured_powershell

Finding RDP sessions on servers using PowerShell

Have you ever needed to use RDP to get to a server console for some local admin work and then been bounced out because there are already active sessions? Or have you had your Active Directory account locked out because of an op...
by Eric
8

 

 
featured_powershell

It’s all about Progress: Using the PowerShell Write-Progress CmdLet

If you are like me and you like to know how your task is going in a PowerShell process, this is a great little tip for you. I’ve got a number of long running scripts that perform actions against a collection or query. The...
by Eric
2

 



Join Zipcar and get $50 in free driving Join Zipcar and get $50 in free driving Join Zipcar and get $50 in free driving

0 Comments


Be the first to comment!


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>