Availability-group DDL operations are permitted only when you are using the master database. Run the USE MASTER command, ...