Daily Archives: January 11, 2012

Powershell script to run query against many servers and send combined output as email

This powershell script is sample code to run query against multiple SQL Servers and export the combined output to Excel. This Excel file is later sent as email attachment using hotmail. Related email thread: http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/987d48c0-a82d-4424-8699-cdd0b2bc9c51 # This posting is provided

Posted in SQL Power shell