lewisrl wrote:
A System Condition used in the AlwaysOn System Policies checks the Server Property "IsHadrEnabled" , but that property doesn't exist for versions lower than SQL Server 2012.
I modified the PowerShell script to skip all policies with a name starting with "AlwaysOn" and the script ran without errors.
Replace
Do any of you have any ideas?Since SQL Server 2012 has System Policies for viewing the health of Availability Groups, the PowerShell script will run Invoke-PolicyEvaluation for each Policy in the store.
A System Condition used in the AlwaysOn System Policies checks the Server Property "IsHadrEnabled" , but that property doesn't exist for versions lower than SQL Server 2012.
I modified the PowerShell script to skip all policies with a name starting with "AlwaysOn" and the script ran without errors.
Replace
if (($Policy.PolicyCategory -eq $PolicyCategoryFilter)-or ($PolicyCategoryFilter -eq ""))
with if (($Policy.PolicyCategory -eq $PolicyCategoryFilter)-or ($PolicyCategoryFilter -eq "") -and ($policy.name -notlike "AlwaysOn*"))