How To Rename DAG Network Using PowerShell

Quick post for a Friday! 

A customer had an “interesting” issue where the DAG networks were not being displayed inside the Exchange Management Console.  The underlying reason is because the implemented firewalls between Exchange servers, and then restricted network traffic between Exchange and the DCs.  This is not a supported situation.  For details on the firewall restricting traffic aspect please see TechNet and the EHLO blog post

In the Exchange Management Console they expected to see the DAG networks like this:

Exchange DAG Network - Now You See It !


However they saw something like this – note that the networks pane is blank:

Exchange DAG Network - Now You Don't..

In order to work around this we used Exchange Management Shell to target an individual server in each DAG and direct the commands to that specific server that was local and the network traffic was not restricted.  We used the Set-DatabaseAvailabilityGroupNetwork  cmdlet with the –Server parameter.  For example: 

Get-DatabaseAvailabilityGroupNetwork –Server MailboxServer01

Since the customer had switched data centres, added and removed some interfaces there were 9 DAG networks in this single DAG. Yes nine – EEEK!   We really should only have two.  One for MAPI and one for REPL.  Some customers may have iSCSI interfaces but that is not too common. 

Once we had worked through the interfaces we deleted the old stale ones that had no assigned subnets, and then adjusted the remaining two.  As part of this I requested the customer rename the interface as DAGNetwork01 and DAGNetwork02 and not intuitive names nor are then descriptive.

This then got a deer in the headlights look from the admin, as they then thought how can I specify the name of something and then in the same command then rename it?  Does that not go into a circular loop?  Thankfully no!  The cunning developers allow us to specify the identify parameter to call out which DAG network we are working with, and then we use the –Name parameter to supply the new name.  For example:

Set-DatabaseAvailabilityGroupNetwork  -Identity 'DAG01\DAGNetwork01'   -Name 'MAPI'


Bonus Tip

If you do have iSCSI networks on a DAG server, then those iSCSI networks should not be used for Exchange or cluster operations.  This configuration must not be done using cluster tools – you will use the Exchange tools that will then call the cluster APIs for you.  For example you would run:

Set-DatabaseAvailabilityGroupNetwork –Identity DAG01\iSCSI  -IgnoreNetwork $True -ReplicationEnabled $False


Note that the iSCSI network was cunningly renamed to iSCSI.  It’s the simple things in life that make it easy…



Comments (4)

  1. Recep YUKSEL says:

    Thank you publish tips.

  2. thanks for the info, always helpful and useful.

  3. anonymouscommenter says:

    Can this be done on the fly?
    Is there any MAPI/Replication interruption?

  4. Not that I’ve seen Juan.

    But – this is a change and you should have change management and implement this in a defined maintenance window.