PowerShell: Export-QueryToSQLTable – Export All Of Glenn Berry’s DMV’s, sp_WhoIsActive, sp_Blitz & Any Of Your Own Queries To SQL Server Tables

There are native PowerShell cmdlets to export to CSV  or text but I have not seen one that can easily export any SQL query output to a SQL Server table in bulk (Write-DbaDataTable function of dbatools does it for one table which I use in my solution below). I probably did not look too hard … Continue reading PowerShell: Export-QueryToSQLTable – Export All Of Glenn Berry’s DMV’s, sp_WhoIsActive, sp_Blitz & Any Of Your Own Queries To SQL Server Tables

Advertisements