I recently got a request to create a number of Exchange database and their copy addition in DAG. To save time I created this script. I used two server in this script and create around 10 DB (5 on each). Each Db will have a copy on another server. You can modify script based on your requirement. I also enabled circular logging so if don’t want that then remove circular logging commands from script.
I tested this on Exchange 2016 and Exchange 2019. It works without any issue.
Here is link to download it.