http://ucsorted.com/2014/11/04/lync-rgs-emergency-failover-script/