This is a PowerShell Script
1. Create a plain text with all your SQL Instances (one by line)
2. Modify the script to change the path\file that contains all you instances names
3. Insert the SQL code in this script with the query you want to check
as this:
4. Run the query.
5. You will have an excel file with your query result per instance as this:
This is very useful for reporting because you can use the query you need (ad hoc).
In the code you can change:
1. The location and name of files
2. The SQL Query Statement
Enjoy