Hi,
I am building a powershell script that has a GUI interface for a 2008R2 cluster with SQL 2012 AlwaysOn Availability Groups. I am at the last stage where I am trying to build out the script to force the manual failover to a third node at a remote site and I am having a difficult time via either powershell or T-SQL building a query that will return just the Availability Group name that I could use with the Switch-AvailabilityGroup command.
Would someone have some insight on how I might accomplish this?
Thank you.