Script to add database in existing availability group by Tsql.
1. Primary server name, port number
2.Secodnary server name , port number
3. Database name
4.Availability group name
5.Shared path on primary server with read and write access for dba id required to take backup from primary server for HADR configuration.
6. This script to be executed in SQLCMD only.
Hope adding database to an existing Always on availability group can be done in TSQL script.
If more number of databases to be added in Always on availability group, We can do it by repeating above steps in Sql server management studio new query window .