Test-DbaAvailabilityGroup
Is this a feature OR bug: Enhancement
https://trello.com/c/j7KgjrfY
Not sure of exact details yet, but there are a few things right off to check based on how the AG was created.
Verify if the XE session for AG is enabled (have seen cases when I use PowerShell to create an AG this is not enabled by the commands). Verify backup preference (thinks like backup preference set to secondary requires licensing to be in place) Maybe something around if read-only is set to yes, check that routing is in place properly (or at all)?
Would also include testing @@servername and the defined replica match. Which if case sensitive collation is configured on the server they need to match case as well, otherwise the backup preference will not be applied properly.
Going to close this one and rewrite into a new issue to track things we need to check...