dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Export-DbaXECsv

Exports Extended Events to a CSV file.

Screenshots

dbatools-Export-DbaXECsv

Examples

Writes Extended Events data to the file “C:\temp\events.csv”.

Get-ChildItem -Path C:\temp\sample.xel | Export-DbaXECsv -Path c:\temp\sample.csv

Writes Extended Events data to the file “C:\temp\events.csv”.

Get-DbaXESession -SqlInstance sql2014 -Session deadlocks | Export-DbaXECsv -Path c:\temp\events.csv

Author

This command was created by Gianluca Sartori. You can find Gianluca on Twitter.

Get-Help

From PowerShell, execute Get-Help Export-DbaXECsv -Detailed for more information on this function.

Source Code

Want to see the source code? View Export-DbaXECsv.ps1 on GitHub
 

Related commands