Script Download: 
The script is available for download in Microsoft Script Browser for Windows PowerShell ISE. You need to install the Script Browser application first, and search for the script sample title.

This PowerShell script will check if system_health session has incorrect map keys in SQL Server 2012.

Every SQL Server instance has a default extended event session created with the name system_health. This session captures information about the wait_info and wait_info_external events. The current definition of the system_health session contains incorrect map_key specified for the wait_types of interest. Use the information from the knowledge base article to correct the extended event session definition.

image image
 image

You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery