Write a Powershell Script to detach all contents dbs from each webapplication and with writing a file which should show db Name, Weba pplication name and DB server Name.
Then Attach those dbs back to the same web application and from the same db servers. it should not ask db name and web app name while mounting.
I work on daily basis with Powershell script and exporting script results to a file. I will be able to provide you the desired scipt by Sunday. Your script is ready, let me know when you want it.