Run SQL queries on multiple databases

Sometimes you have multiple databases that you want to run SQL queries on. It can be time consuming to go through each one after one. The method that works the easiest for me to accomplish this is to do it through Powershell. You can also do it by creating an SQL function where you pass …