I will be kicking off a migration project very soon wherein I will setup DB Mirroring in order to do a final cut over at the planned date saving me sometime. Currently, we have around more than 50 databases sitting around to be migrated. I obviously don't want to do everything one by one. I was hoping if there is a script or someone might have used it before that would basically mirror all the user dbs and then at the day of migration I could just use another T-SQL that would loop through the databases synchronize it and fail it over and once everything is confirmed okay by the app team we can remove mirroring.
Fyi...the servers are standalone boxes so there is no question of AlwaysOn to be used. Also, LogShipping for me seemed to bit a more pain. Also, I know this is a one way street and we can't failback but we've already tested things out so there is no question of failback here.
I second what LowlyDBA has said, DBATools has a good option. In addition to that, I would also recommend looking at what Robert Davis has said about DBM Automation