I have a two node SQL Server  2012 High Availability Cluster.  I need to check to see which node is the Primary replica so I can configure certain Alarm Actions to only fire if the node is the Primary Replica.  For example, log backups only occur on the current Primary Replica so I constantly get alarms from the Secondary that the databases' logs are not being backed up.