Author | Gianluca Sartori (@spaghettidba) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Export-DbaXECsv on GitHub.
Want to see the Bill Of Health for this command? Check out Export-DbaXECsv.
Exports Extended Events to a CSV file.
Exports Extended Events to a CSV file.
Export-DbaXECsv
[-InputObject] <Object[]>
[[-Path] <String>]
[[-FilePath] <String>]
[-EnableException]
[<CommonParameters>]
PS C:\> 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".
PS C:\> Get-DbaXESession -SqlInstance sql2014 -Session deadlocks | Export-DbaXECsv -Path c:\temp\events.csv
Writes Extended Events data to the file "C:\temp\events.csv".
Allows Piping
Alias | FullName |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Specifies the directory where the file or files will be exported.
Alias | |
Required | False |
Pipeline | false |
Default Value | (Get-DbatoolsConfigValue -FullName 'Path.DbatoolsExport') |
Specifies the full file path of the output file.
Alias | OutFile,FileName |
Required | False |
Pipeline | false |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |