Skip to content

Test-DbaAvailabilityGroup - Add -Policy switch for all 13 Always On policies#10234

Closed
andreasjordan wants to merge 1 commit intodevelopmentfrom
claude/issue-9911-20260314-1250
Closed

Test-DbaAvailabilityGroup - Add -Policy switch for all 13 Always On policies#10234
andreasjordan wants to merge 1 commit intodevelopmentfrom
claude/issue-9911-20260314-1250

Conversation

@andreasjordan
Copy link
Collaborator

Adds a -Policy switch to Test-DbaAvailabilityGroup that evaluates all 13 predefined Always On Availability Group policies from Microsoft's Policy-Based Management framework.

Each policy check returns an object with PolicyName, Category, Facet, Status (Healthy/Unhealthy), Issue, and Details.

Related to #9911

Generated with Claude Code

…olicies

Adds -Policy switch that evaluates all 13 predefined Always On AG policies
from Microsoft's Policy-Based Management framework, grouped by facet:
- Server: WSFC Cluster State (Critical)
- Availability group: 6 policies using AvailabilityGroupState SMO object
- Availability replica: Role, Join, Data Synchronization (per replica)
- Availability database: Suspension, Data Sync, Join (via Get-DbaAgDatabaseReplicaState)

Each check returns PolicyName, Category, Facet, Status, Issue, and Details.

(do Test-DbaAvailabilityGroup)

Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
@andreasjordan
Copy link
Collaborator Author

See my thoughts about this in #9911 - this is not a pr to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant