Lync 2013 – Standard Edition Pool Pair Failover Script

Lync 2013 introduced a new feature called Pool Pairing. Given the scenario below with 2 sites using Lync Standard Edition with paired pools, in the event that Front End 01 was to fail, or Site 1 failed completely all users will automatically register to Front End 02. However they will receive an error in their Lync client “Limited Functionality due to Outage”, lose their buddy lists, presence information, conferencing features and any Response Groups that were homed on FE01. They will still be able to make inbound and outbound PSTN calls (assuming you have resilient Voice Routing) and they will still be able to search contacts to make P2P audio and video calls. To restore full functionality you need to manually failover the pool following the procedure here: http://technet.microsoft.com/en-us/library/jj204678.aspx

Remembering or finding the various commands to run in a disaster scenario wastes valuable restore time so I have created a script to do all the hard work for you. The script can also fail back a pool once it is back in service. This script relies on my Lync Backup script to restore Response Groups here (I save these on the standby server if Active/Passive): http://weakestlync.com/2013/07/07/lync-2013-automated-backup-script/

Simple Lync Standard Edition Pool Pair topology:

Limited functionality error in Lync 2013 client:

The script is menu driven, the splash screen will show the script configuration, it is important to review all of this information before running:

From the main menu you have various options.

Options:

  • a – failover pool01 to pool02
  • b – failover pool01’s response groups to pool02
  • c – fail back pool01’s users to pool01
  • d – fail back pool01’s response groups to pool01
  • i – view manual DNS changes required during failover
  • j – shows pool state – Use to check if a pool is currently in a failover state
  • k – shows CMS status – Check replication is working and which server is master
  • l – view failed over response group status for both pools – Use to check if any Response Groups have been failed over
  • m – view backup service status for both pools – Use to check that the backup service is working OK
  • z – enable advanced mode (show failover options for both pools and CMS) – Use if you want to failover Pool02 to Pool01 or manually move CMS

Option z:

Here is the script, you need to modify the Script Configuration at the top to reflect your environment.:

Use this script at your own risk. I have not programmed Lync Enterprise Edition but it could easily be modified to failover an Enterprise Pool.

 

Author: Chris Hayward

Share This Post On

13 Comments

  1. Thanks for the great post, is there an opportunity to provide the script as a download link?

    Post a Reply
  2. Hi there,
    your script gives me some errors:

    At C:tempLync-Failover.ps1:277 char:34
    + Write-Host “q. Exit Script (q, exit, quit)”
    + ~
    Missing argument in parameter list.
    At C:tempLync-Failover.ps1:332 char:42
    + Read-Host “Press any key to load menu”
    + ~
    The string is missing the terminator: “.
    At C:tempLync-Failover.ps1:52 char:48
    + Function FailbackDR ($Pool, $BackupPool, $Edge){
    + ~
    Missing closing ‘}’ in statement block.
    + CategoryInfo : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : MissingArgument

    Post a Reply
    • Did you copy and paste the script?

      Line 277 should be: Write-Host “”
      Line 332 should be: MainMenu
      Line 53 should be: cls

      Try downloading it from here: http://1drv.ms/Rk2V6O

      Rename to .ps1

      Post a Reply
  3. Hi there. If I download from the link you have provided (http://1drv.ms/Rk2V6O) I recieve an error:

    At C:tempLync-Failover.ps1:276 char:34
    + Write-Host “q. Exit Script (q, exit, quit)”
    + ~
    Missing argument in parameter list.
    At C:tempLync-Failover.ps1:331 char:42
    + Read-Host “Press any key to load menu”
    + ~
    The string is missing the terminator: “.
    At C:tempLync-Failover.ps1:51 char:48
    + Function FailbackDR ($Pool, $BackupPool, $Edge){
    + ~
    Missing closing ‘}’ in statement block.
    + CategoryInfo : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : MissingArgument

    Post a Reply
    • Is there a particular part of the script doesn’t work? I have copied it, saved as .ps1 and ran it ok. What OS are you running? I have Windows Server 2012.

      Post a Reply
  4. Windows 2012 STD here. I would expect a MENU should appear when you run the script, but like I said it gives me those errors. Very strange.

    Post a Reply
    • Excellent, thanks for sharing the fix. I always use PowerShell ISE to edit PowerShell scripts so probably why I haven’t come across that error.

      Post a Reply
  5. I have an enterprise Lab, can I use this

    Post a Reply
    • Hi,

      This works with Enterprise Edition but you need to modify the code that moves the CMS as on Enterprise it is hosted on backend SQL. There are steps required to check which node is active in a mirror.

      Post a Reply

Trackbacks/Pingbacks

  1. NeWay Technologies – Weekly Newsletter #80 – January 30, 2014 | NeWay - […] Lync 2013 – Standard Edition Pool Pair Failover Script – 22-Jan-2014 […]
  2. NeWay Technologies – Weekly Newsletter #80 – January 31, 2014 | NeWay - […] Lync 2013 – Standard Edition Pool Pair Failover Script – 22-Jan-2014 […]
  3. Lync 2013 – Standard Edition Pool Pair Failover Script | www.WeakestLync.com « JC's Blog-O-Gibberish - […] http://weakestlync.com/2014/01/22/lync-2013-standard-edition-pool-pair-failover-script/ […]

Submit a Comment

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