Import-Module SQLPS;
Import-Module FailoverClusters;

# Enable the AlwaysOn Service on each cluster node
Get-ClusterNode | % { Enable-SqlAlwaysOn -ServerInstance $_.Name -Force; }

# Disable the AlwaysOn Service on each cluster node
# Get-ClusterNode | % { Disable-SqlAlwaysOn -ServerInstance $_.Name -Force; }

# Start the SQL Server Agent service
Start-Service SQLServerAgent
Start-Service -InputObject $(Get-Service -Computer SQL2K12-SVR2 -Name SQLServerAgent)
Start-Service -InputObject $(Get-Service -Computer SQL2K12-SVR3 -Name SQLServerAgent)
Start-Service -InputObject $(Get-Service -Computer SQL2K12-SVR4 -Name SQLServerAgent)