Skip to content

This PowerShell module will connect to and intereract with the SQL Server Diagnostics API - More details about the API here https://ecsapi.portal.azure-api.net/

License

Notifications You must be signed in to change notification settings

SQLDBAWithABeard/SQLDiagAPI

Repository files navigation

SQLDiagAPI

This is a module to work with the SQL Server Diagnostics (Preview) API. See https://blogs.msdn.microsoft.com/sql_server_team/sql-server-diagnostics-preview/ for more details

Blog Posts about this module

How the module was created and usign TDD for Get-SQLDiagRecommendations http://sqldbawithabeard.com/2017/06/30/creating-a-powershell-module-and-tdd-for-get-sqldiagrecommendations/

using Get-SQLDiagRecommendations http://sqldbawithabeard.com/2017/06/29/powershell-module-for-the-sql-server-diagnostics-api-1st-command-get-sqldiagrecommendations/

Using Get-SQLDiagFix https://sqldbawithabeard.com/2017/07/04/using-get-sqldiagfix-to-get-information-from-the-sql-server-diagnostic-api-with-powershell/

Installation

Please follow the instructions here install

Commands

To understand how best to use the commands please run

Get-Help CommandName -Full

This will show you details and plenty of examples

You can also find the documentation for the commands here

Get-SQLDiagFix

This function connects to the SQL Server Diagnostic Recommendations API and returns the Fixes for the latest Cumulative Update by Product or Feature Area or both.

The video below shows how it works

Alt text

Get-SQLDiagRecommendations

This function connects to the SQL Server Diagnostic Recommendations API and returns a PSCustomObject with information about the latest Cumulative Updates for various SQL Server Versions. Details here https://ecsapi.portal.azure-api.net/

It requires the APIKey parameter or the APIKey to be stored using Export-CliXML in the users profile in a file named SQLDiag.Cred

alt text

Get-SQLDiagProduct

This function returns the products available in the SQL Server Diagnostic API

alt text

Get-SQLDiagLatestCU

This function returns the latest Cumulative Updates and the date

alt text

Get-SQLDiagFeature

This function will show the feature areas that have fixes in the SQL Server Diagnostics Recommendations API for one, several or all products

alt text

Authored by Rob Sewell

About

This PowerShell module will connect to and intereract with the SQL Server Diagnostics API - More details about the API here https://ecsapi.portal.azure-api.net/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published