did a great job of writing these blog posts. you may find it useful when you need to monitor AlwaysOn health  in your automation scenarios

Monitoring AlwaysOn Health with PowerShell - Part 1: Basic Cmdlet Overview
http://blogs.msdn.com/b/sqlalwayson/archive/2012/02/13/monitoring-alwayson-health-with-powershell-part-1.aspx

Monitoring AlwaysOn Health with PowerShell - Part 2: Advanced Cmdlet Usage
http://blogs.msdn.com/b/sqlalwayson/archive/2012/02/13/monitoring-alwayson-health-with-powershell-part-2.aspx

Monitoring AlwaysOn Health with PowerShell - Part 3 : A Simple Monitoring Application
http://blogs.msdn.com/b/sqlalwayson/archive/2012/02/15/monitoring-alwayson-health-with-powershell-part-3.aspx

Monitoring AlwaysOn Health with PowerShell - Part 4 : Integration with SQL Server Agent
http://blogs.msdn.com/b/sqlalwayson/archive/2012/02/15/the-always-on-health-model-part-4.aspx