Thanks for this useful article, as i am currently trying to implement a similar solution for our company moving to Always On (Deliberate spacing on name 🙂 )
Seems to be a couple of typo's in your script
In the sections for Creating the tables HIST_ServerAGRole and HIST_EnableDisableJob there missing a closing parenthis
There's a declare scaler variable missing for @_Source_NM within the uspAG_DisableEnableJobsandAlerts SP
Not sure if it's a typo or not?